private void Dispose(bool disposeManaged) { if (!_isDisposed) { if (disposeManaged) { // } // Schedule for deletion on a GL thread. OpenGLGraphicsAdapter.Schedule(() => { Log.Debug($"[Dispose] {GetType().Name} ({Handle})."); GL.DeleteBuffer(Handle); }); _isDisposed = true; } }
private void Dispose(bool disposeManaged) { if (!_isDisposed) { if (disposeManaged) { // nothing } // Schedule deleting the GL texture resource OpenGLGraphicsAdapter.Schedule(() => { Log.Debug($"[Dispose] Texture ({Handle})"); GL.DeleteTexture(Handle); }); _isDisposed = true; } }
private void Dispose(bool disposeManaged) { if (!_isDisposed) { if (disposeManaged) { // ... } // Schedule for deletion on a GL thread. OpenGLGraphicsAdapter.Schedule(() => { Log.Debug($"[Dispose] Shader Stage ({Handle})"); GL.DeleteShader(Handle); }); _isDisposed = true; } }
private void Dispose(bool disposeManaged) { if (!_isDisposed) { if (disposeManaged) { // Nothing } // Schedule for deletion on a GL thread. OpenGLGraphicsAdapter.Schedule(() => { Log.Debug($"[Dispose] Renderbuffer ({Handle})"); GL.DeleteRenderbuffer(Handle); }); _isDisposed = true; } }