]> OCCT Git - occt-copy.git/commitdiff
0026492: OpenGl_FrameBuffer does not releases itself correctly
authorduv <duv@opencascade.com>
Tue, 28 Jul 2015 13:17:57 +0000 (16:17 +0300)
committerabv <abv@opencascade.com>
Wed, 2 Sep 2015 11:38:35 +0000 (14:38 +0300)
Logic related to myIsOwnBuffer flag in OpenGl_FrameBuffer was corrected.

src/OpenGl/OpenGl_FrameBuffer.cxx

index 2e0c192c84fbe4e48009bf40c1931201db11023f..fc4c52b713da23e2f940bc5d5c58299b640f481c 100644 (file)
@@ -64,6 +64,8 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo
   // clean up previous state
   Release (theGlContext.operator->());
 
+  myIsOwnBuffer = true;
+
   // setup viewport sizes as is
   myVPSizeX = theViewportSizeX;
   myVPSizeY = theViewportSizeY;
@@ -163,6 +165,8 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB (const Handle(OpenGl_Context)& t
   // clean up previous state
   Release (theGlCtx.operator->());
 
+  myIsOwnBuffer = true;
+
   // setup viewport sizes as is
   myVPSizeX = theViewportSizeX;
   myVPSizeY = theViewportSizeY;