Procházet zdrojové kódy

Merge pull request #287 from GWRon/fix_fbodeletion

Fix: [GLmax2d.mod] Only delete framebuffers if used
Brucey před 2 roky
rodič
revize
8a079b1bd9
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      glmax2d.mod/glmax2d.bmx

+ 4 - 1
glmax2d.mod/glmax2d.bmx

@@ -422,7 +422,10 @@ Type TGLRenderImageFrame Extends TGLImageFrame
 	
 	
 Private
 Private
 	Method Delete()
 	Method Delete()
-		glDeleteFramebuffers(1, Varptr FBO) ' gl ignores 0
+		'remove framebuffer if used
+		if FBO <> 0
+			glDeleteFramebuffers(1, Varptr FBO) ' gl ignores 0
+		EndIf
 	EndMethod
 	EndMethod
 
 
 	Method New()
 	Method New()