From 1457deeb5e8951edd491c256c3a5c43b83a87580 Mon Sep 17 00:00:00 2001 From: rti Date: Tue, 31 May 2011 18:10:32 +0200 Subject: [PATCH] Fixed: #1006 On Mac OS X, do glFinish() after vertex program upload to ensure program is ready to use. --- .../src/3d/driver/opengl/driver_opengl_vertex_program.cpp | 8 ++++++++ code/ryzom/client/src/main_loop.cpp | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index 4c255e1d9..befcb7b9b 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -1440,6 +1440,14 @@ bool CDriverGL::setupARBVertexProgram (const CVPParser::TProgram &inParsedProgra nlassert(0); return false; } + +#ifdef NL_OS_MAC + // Wait for GPU to finish program upload, else draw comands might crash. + // Happened to CVegetableBlendLayerModel (glDrawElements()). + // For more information, see http://dev.ryzom.com/issues/1006 + glFinish(); +#endif + return true; } diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index f8ff5ae89..2a513244a 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -700,9 +700,6 @@ void updateFromClientCfg() //--------------------------------------------------- if (Landscape) { -#ifdef NL_OS_MAC - Landscape->enableVegetable(false); -#else if (ClientCfg.MicroVeget != LastClientCfg.MicroVeget) { if(ClientCfg.MicroVeget) @@ -722,7 +719,6 @@ void updateFromClientCfg() Landscape->enableVegetable(false); } } -#endif } //---------------------------------------------------