Esempio n. 1
0
        /// <summary>
        /// Deinitialize
        /// </summary>
        public void DeInit()
        {
            colorShader.Dispose();
            litColorShader.Dispose();
            litTexturerShader.Dispose();
            deviceBuffer.Dispose();

            // dispose of global vao
            GL.DeleteVertexArray(vertexArrayObjectId);
        }
Esempio n. 2
0
        public static void ReleaseResources()
        {
            if (ColorShader != null)
            {
                ColorShader.Dispose();
                ColorShader = null;
            }

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

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

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

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

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

            if (SimpleTextureShader != null)
            {
                SimpleTextureShader.Dispose();
                SimpleTextureShader = null;
            }
        }
Esempio n. 3
0
        public void Dispose()
        {
            if (SceneGraph != null)
            {
                SceneGraph.DisposeAll();
                SceneGraph = null;
            }

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

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

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

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

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

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