Browse Source

Merge pull request #7528 from odalet/fix-OpenGLControlBase

Fix #7519 - Reset fb and depth buffer Ids once they are deleted
pull/7534/head
Nikita Tsukanov 4 years ago
committed by GitHub
parent
commit
fb7cf3dde1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs

2
src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs

@ -89,7 +89,9 @@ namespace Avalonia.OpenGL.Controls
gl.BindTexture(GL_TEXTURE_2D, 0);
gl.BindFramebuffer(GL_FRAMEBUFFER, 0);
gl.DeleteFramebuffers(1, new[] { _fb });
_fb = 0;
gl.DeleteRenderbuffers(1, new[] { _depthBuffer });
_depthBuffer = 0;
_attachment?.Dispose();
_attachment = null;
_bitmap?.Dispose();

Loading…
Cancel
Save