From d7fb5e86be36c74d70b1f74a5055c7696e5f8cd2 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Dec 2010 18:05:01 +0100 Subject: [PATCH] Changed: Use GL_ARB_vertex_buffer_object in priority (supported on most of cards and faster) --- .../src/3d/driver/opengl/driver_opengl.cpp | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 848905f4f..730470626 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -461,8 +461,17 @@ bool CDriverGL::setupDisplay() _SupportVBHard= false; _SlowUnlockVBHard= false; _MaxVerticesByVBHard= 0; - // Try with NVidia ext first. - if(_Extensions.NVVertexArrayRange) + + // Try with ARB ext first. + if (_Extensions.ARBVertexBufferObject) + { + _AGPVertexArrayRange= new CVertexArrayRangeARB(this); + _VRAMVertexArrayRange= new CVertexArrayRangeARB(this); + _SupportVBHard= true; + _MaxVerticesByVBHard = std::numeric_limits::max(); // cant' know the value.. + } + // Next with NVidia ext + else if(_Extensions.NVVertexArrayRange) { _AGPVertexArrayRange= new CVertexArrayRangeNVidia(this); _VRAMVertexArrayRange= new CVertexArrayRangeNVidia(this); @@ -491,14 +500,6 @@ bool CDriverGL::setupDisplay() // tmp fix for ati _MaxVerticesByVBHard= 16777216; } - // Else, try with ARB ext - else if (_Extensions.ARBVertexBufferObject) - { - _AGPVertexArrayRange= new CVertexArrayRangeARB(this); - _VRAMVertexArrayRange= new CVertexArrayRangeARB(this); - _SupportVBHard= true; - _MaxVerticesByVBHard = std::numeric_limits::max(); // cant' know the value.. - } // Reset VertexArrayRange. _CurrentVertexArrayRange= NULL; @@ -812,7 +813,7 @@ bool CDriverGL::swapBuffers() /* Yoyo: must do this (GeForce bug ??) else weird results if end render with a VBHard. Setup a std vertex buffer to ensure NVidia synchronisation. */ - if (_Extensions.NVVertexArrayRange) + if (!_Extensions.ARBVertexBufferObject && _Extensions.NVVertexArrayRange) { static CVertexBuffer dummyVB; static bool dummyVBinit= false; @@ -854,7 +855,7 @@ bool CDriverGL::swapBuffers() AS NV_Fence GeForce Implementation says. Test each frame the NVFence, until completion. NB: finish is not required here. Just test. This is like a "non block synchronisation" */ - if (_Extensions.NVVertexArrayRange) + if (!_Extensions.ARBVertexBufferObject && _Extensions.NVVertexArrayRange) { set::iterator itVBHard= _VertexBufferHardSet.Set.begin(); while(itVBHard != _VertexBufferHardSet.Set.end() )