Exemple #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                Graphics = null;

                if (ConstantBuffer != null)
                {
                    ConstantBuffer.Dispose();
                    ConstantBuffer = null;
                }

                if (InputLayout != null)
                {
                    InputLayout.Dispose();
                    InputLayout = null;
                }

                if (Shader != null)
                {
                    Shader.Dispose();
                    Shader = null;
                }
            }
        }
Exemple #2
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXRenderTarget(SharpDXGraphicsMgr graphics,
                                   Texture2D texture,
                                   int width,
                                   int height,
                                   RenderTargetView renderTarget)
            : base(graphics, texture, width, height)
        {
            RenderTarget = renderTarget;
        }
Exemple #3
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXTexture(SharpDXGraphicsMgr graphics,
                              Texture2D texture,
                              int width,
                              int height)
        {
            Graphics = graphics;
            Texture  = texture;

            Height = height;
            Width  = width;
        }
Exemple #4
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXTriMesh(SharpDXGraphicsMgr graphics,
                              D3D11.Buffer indexBuffer,
                              D3D11.Buffer vertexBuffer,
                              int numTris,
                              int numVerts)
        {
            Graphics     = graphics;
            IndexBuffer  = indexBuffer;
            VertexBuffer = vertexBuffer;

            NumTris  = numTris;
            NumVerts = numVerts;
        }
Exemple #5
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXShader(SharpDXGraphicsMgr graphics,
                             D3D11.DeviceChild shader,
                             D3D11.InputLayout inputLayout,
                             Type constantsType)
        {
            Graphics    = graphics;
            InputLayout = inputLayout;
            Shader      = shader;

            if (constantsType != null)
            {
                ConstantBuffer = CreateConstantBuffer(constantsType);
            }
        }
Exemple #6
0
        /*-------------------------------------
         * NON-PUBLIC METHODS
         *-----------------------------------*/

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                foreach (var triMesh in m_TriMeshes)
                {
                    triMesh.Dispose();
                }

                m_TriMeshes.Clear();
                m_TriMeshes = null;

                m_Graphics = null;
            }
        }
Exemple #7
0
        /*-------------------------------------
         * NON-PUBLIC METHODS
         *-----------------------------------*/

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                foreach (var shader in m_Shaders)
                {
                    shader.Dispose();
                }

                m_Shaders.Clear();
                m_Shaders = null;

                Graphics = null;
            }
        }
Exemple #8
0
        /*-------------------------------------
         * NON-PUBLIC METHODS
         *-----------------------------------*/

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                foreach (var texture in m_Textures)
                {
                    texture.Dispose();
                }

                m_Textures.Clear();
                m_Textures = null;

                m_White    = null;
                m_Graphics = null;
            }
        }
Exemple #9
0
        /*-------------------------------------
         * NON-PUBLIC METHODS
         *-----------------------------------*/

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (IndexBuffer != null)
                {
                    IndexBuffer.Dispose();
                    IndexBuffer = null;
                }

                if (VertexBuffer != null)
                {
                    VertexBuffer.Dispose();
                    VertexBuffer = null;
                }

                Graphics = null;
            }
        }
Exemple #10
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_ShaderResource != null)
                {
                    m_ShaderResource.Dispose();
                    m_ShaderResource = null;
                }

                if (Texture != null)
                {
                    Texture.Dispose();
                    Texture = null;
                }

                Graphics = null;

                Width  = 0;
                Height = 0;
            }
        }
Exemple #11
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXTriMeshMgr(SharpDXGraphicsMgr graphics)
        {
            m_Graphics = graphics;
        }
Exemple #12
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXTextureMgr(SharpDXGraphicsMgr graphics)
        {
            m_Graphics = graphics;
        }
Exemple #13
0
        /*-------------------------------------
         * CONSTRUCTORS
         *-----------------------------------*/

        public SharpDXShaderMgr(SharpDXGraphicsMgr graphics)
        {
            Graphics = graphics;
        }