From: san Date: Wed, 6 Jun 2018 16:58:10 +0000 (+0300) Subject: 0029844: Volume Rendering - NVIDIA graphic driver timeout errors with callback enabled X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=e2240d3a56d3fdc178294701037fd8bbc160495b;p=occt-copy.git 0029844: Volume Rendering - NVIDIA graphic driver timeout errors with callback enabled An attempt to resolve CPU-GPU synchronization issues using glFinish() --- diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 2585bf66c1..8ca8f9974b 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -567,7 +567,7 @@ void OpenGl_Context::SwapBuffers() if ((HDC )myWindowDC != NULL) { ::SwapBuffers ((HDC )myWindowDC); - glFlush(); + glFinish(); } #else if ((Display* )myDisplay != NULL) diff --git a/src/OpenGl/OpenGl_View_Redraw.cxx b/src/OpenGl/OpenGl_View_Redraw.cxx index 7835b4f3a1..79f6e136ed 100644 --- a/src/OpenGl/OpenGl_View_Redraw.cxx +++ b/src/OpenGl/OpenGl_View_Redraw.cxx @@ -362,7 +362,7 @@ void OpenGl_View::Redraw() } else { - aCtx->core11fwd->glFlush(); + aCtx->core11fwd->glFinish(); } // reset render mode state @@ -507,7 +507,7 @@ void OpenGl_View::RedrawImmediate() } else { - aCtx->core11fwd->glFlush(); + aCtx->core11fwd->glFinish(); } myWasRedrawnGL = Standard_True;