From e2240d3a56d3fdc178294701037fd8bbc160495b Mon Sep 17 00:00:00 2001 From: san Date: Wed, 6 Jun 2018 19:58:10 +0300 Subject: [PATCH] 0029844: Volume Rendering - NVIDIA graphic driver timeout errors with callback enabled An attempt to resolve CPU-GPU synchronization issues using glFinish() --- src/OpenGl/OpenGl_Context.cxx | 2 +- src/OpenGl/OpenGl_View_Redraw.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5