public void Dispose() { if (!disposed) { if (shaderObject != IntPtr.Zero) { GhostManager.Add(new ShaderRLGhost(shaderObject)); shaderObject = IntPtr.Zero; } GC.SuppressFinalize(this); disposed = true; } }
public void Dispose() { if (!disposed) { if (shaderObject != 0) { GhostManager.Add(new ShaderGL3Ghost(shaderObject)); shaderObject = 0; } GC.SuppressFinalize(this); disposed = true; } }
public void Dispose() { if (!disposed) { if (bufferObject != UInt32.MaxValue) { GhostManager.Add(new BufferGhost(bufferObject)); bufferObject = UInt32.MaxValue; } GC.SuppressFinalize(this); disposed = true; } }
public void Dispose() { if (!disposed) { if (textureObject != IntPtr.Zero) { GhostManager.Add(new TextureRLGhost(textureObject)); Debug.WriteLine("GhostTexture: " + textureObject.ToString()); textureObject = IntPtr.Zero; } GC.SuppressFinalize(this); disposed = true; } }
public void Dispose() { if (!disposed) { //System.Diagnostics.Debug.WriteLine("DeleteRenderbuffers " + renderBufferObject); if (renderBufferObject != 0) { GhostManager.Add(new RenderBufferGhost(renderBufferObject)); renderBufferObject = 0; } GC.SuppressFinalize(this); disposed = true; } }
public void Dispose() { if (!disposed) { foreach (var shader in shaders) { shader.Dispose(); } shaders.Clear(); if (programObject != System.IntPtr.Zero) { #if DEBUG_PROGRAM Trace.WriteLine("Ghosting program " + Name + " " + programObject); #endif GhostManager.Add(new ProgramRLGhost(programObject)); programObject = System.IntPtr.Zero; } GC.SuppressFinalize(this); disposed = true; } }
public void Dispose() { if (!disposed) { foreach (var kvp in textures) { kvp.Value.Dispose(); } foreach (var kvp in renderbuffers) { kvp.Value.Dispose(); } if (framebufferObject != IntPtr.Zero) { GhostManager.Add(new FramebufferRLGhost(framebufferObject)); framebufferObject = IntPtr.Zero; } System.GC.SuppressFinalize(this); disposed = true; } }