Tweaked osg::Geometry's VBO code so that it should not call

VBO when the extension is not supported.
This commit is contained in:
Robert Osfield
2003-07-07 08:01:09 +00:00
parent 639fc547d5
commit 9239173019

View File

@@ -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);
}