]> OCCT Git - occt-copy.git/commitdiff
0029844: Volume Rendering - NVIDIA graphic driver timeout errors with callback enabled
authorsan <san@opencascade.com>
Wed, 6 Jun 2018 16:58:10 +0000 (19:58 +0300)
committeraba <aba@opencascade.com>
Mon, 11 Feb 2019 10:05:12 +0000 (13:05 +0300)
An attempt to resolve CPU-GPU synchronization issues using glFinish()

src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_View_Redraw.cxx

index 18cbea056d29b53b56bcc7e4a82b1e7bf1e04ac4..8e0beecc4b8a051b2f48468d49f555623e97d6a3 100644 (file)
@@ -671,7 +671,7 @@ void OpenGl_Context::SwapBuffers()
   if ((HDC )myWindowDC != NULL)
   {
     ::SwapBuffers ((HDC )myWindowDC);
-    glFlush();
+    glFinish();
   }
 #else
   if ((Display* )myDisplay != NULL)
index d499839e4df1e01ceeed66417d4addff4d13f62d..a25ebf2c08fcea0ed340bf9721a148178fce52f1 100644 (file)
@@ -561,7 +561,7 @@ void OpenGl_View::Redraw()
   }
   else
   {
-    aCtx->core11fwd->glFlush();
+    aCtx->core11fwd->glFinish();
   }
 
   // reset render mode state
@@ -731,7 +731,7 @@ void OpenGl_View::RedrawImmediate()
   }
   else
   {
-    aCtx->core11fwd->glFlush();
+    aCtx->core11fwd->glFinish();
   }
   aCtx->FrameStats()->FrameEnd (myWorkspace);