protected override void DoDispose() { Background.Dispose(); CompressToSwap.Dispose(); Lines.Dispose(); SphereRenderer.Dispose(); CapsuleRenderer.Dispose(); CylinderRenderer.Dispose(); BoxRenderer.Dispose(); TriangleRenderer.Dispose(); MeshRenderer.Dispose(); UILineRenderer.Dispose(); GlyphRenderer.Dispose(); GL.DeleteFramebuffer(framebuffer); GL.DeleteTexture(depthBuffer); GL.DeleteTexture(colorBuffer); GL.DeleteFramebuffer(resolvedFramebuffer); GL.DeleteTexture(resolvedColorBuffer); Shapes.Dispose(); }
public void Dispose() { if (!disposed) { disposed = true; Background.Dispose(); CompressToSwap.Dispose(); Lines.Dispose(); SphereRenderer.Dispose(); CapsuleRenderer.Dispose(); CylinderRenderer.Dispose(); BoxRenderer.Dispose(); TriangleRenderer.Dispose(); MeshRenderer.Dispose(); UILineRenderer.Dispose(); GlyphRenderer.Dispose(); dsv.Dispose(); depthBuffer.Dispose(); rtv.Dispose(); colorBuffer.Dispose(); resolvedSRV.Dispose(); resolvedRTV.Dispose(); resolvedColorBuffer.Dispose(); rasterizerState.Dispose(); opaqueDepthState.Dispose(); opaqueBlendState.Dispose(); a2cBlendState.Dispose(); uiDepthState.Dispose(); uiBlendState.Dispose(); Shapes.Dispose(); } }