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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
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(); |
|
|
|
|