From 923917301906a7a7408a35fd08826de64049e42b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 7 Jul 2003 08:01:09 +0000 Subject: [PATCH] Tweaked osg::Geometry's VBO code so that it should not call VBO when the extension is not supported. --- src/osg/Geometry.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 86e3de139..b36ad7577 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -810,6 +810,8 @@ void Geometry::drawImplementation(State& state) const DrawVertexAttribMap drawVertexAttribMap; bool handleVertexAttributes = (!_vertexAttribList.empty() && extensions->isVertexProgramSupported()); + + bool usingVertexBufferObjects = _useVertexBufferObjects && state.isVertexBufferObjectSupported(); if (areFastPathsUsed()) { @@ -817,7 +819,7 @@ void Geometry::drawImplementation(State& state) const // // fast path. // - if (_useVertexBufferObjects && state.isVertexBufferObjectSupported()) + if (usingVertexBufferObjects) { // // Vertex Buffer Object path for defining vertex arrays. @@ -1131,7 +1133,7 @@ void Geometry::drawImplementation(State& state) const } - if (_useVertexBufferObjects) + if (usingVertexBufferObjects) { extensions->glBindBuffer(GL_ARRAY_BUFFER_ARB,0); }