0023001: Mistake in OpenGl_FrameBuffer::IsValidDepthBuffer
authorapl <apl@opencascade.com>
Wed, 21 Mar 2012 11:59:42 +0000 (15:59 +0400)
committerbugmaster <bugmaster@opencascade.com>
Wed, 21 Mar 2012 14:17:17 +0000 (18:17 +0400)
src/OpenGl/OpenGl_FrameBuffer.hxx
src/OpenGl/OpenGl_Workspace_2.cxx

index a384c63..4daa5ad 100644 (file)
@@ -136,7 +136,7 @@ private:
 
   Standard_Boolean IsValidDepthBuffer() const
   {
-    return myGlTextureId != NO_RENDERBUFFER;
+    return myGlDepthRBId != NO_RENDERBUFFER;
   }
 
 private:
index cf34c95..335947d 100644 (file)
@@ -731,9 +731,14 @@ Standard_Boolean OpenGl_Workspace::Print
   glViewport (aViewPortBack[0], aViewPortBack[1], 
               aViewPortBack[2], aViewPortBack[3]);
   if (aPrevBuffer)
+  {
     aPrevBuffer->ChangeViewport (aPrevBufferX, aPrevBufferY);
+  }
   else
+  {
+    aFrameBuffer->Release (GetGlContext ());
     delete aFrameBuffer;
+  }
 
   // delete resources
 #ifndef HAVE_FREEIMAGE