0026492: OpenGl_FrameBuffer does not releases itself correctly
authorduv <duv@opencascade.com>
Tue, 28 Jul 2015 13:17:57 +0000 (16:17 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 29 Jul 2015 10:46:49 +0000 (13:46 +0300)
Logic related to myIsOwnBuffer flag in OpenGl_FrameBuffer was corrected.

src/OpenGl/OpenGl_FrameBuffer.cxx

index 37bb42c..60dc243 100644 (file)
@@ -62,6 +62,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 = theSizeX;
   myVPSizeY = theSizeY;
@@ -164,6 +166,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 = theSizeX;
   myVPSizeY = theSizeY;