diff --git a/include/osg/Drawable b/include/osg/Drawable index 0c828e828..13be012c0 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -532,7 +532,7 @@ inline void Drawable::draw(RenderInfo& renderInfo) const #ifdef OSG_GL_DISPLAYLISTS_AVAILABLE - if (_useDisplayList) + if (!state.useVertexBufferObject(_supportsVertexBufferObjects && _useVertexBufferObjects) && _useDisplayList) { // get the contextID (user defined ID of 0 upwards) for the // current OpenGL context. diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 4800530fc..aa3ea1680 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -595,7 +595,7 @@ void Drawable::compileGLObjects(RenderInfo& renderInfo) const { #ifdef OSG_GL_DISPLAYLISTS_AVAILABLE - if (_useDisplayList) + if (!renderInfo.getState()->useVertexBufferObject(_supportsVertexBufferObjects && _useVertexBufferObjects) && _useDisplayList) { // get the contextID (user defined ID of 0 upwards) for the // current OpenGL context. @@ -624,7 +624,6 @@ void Drawable::compileGLObjects(RenderInfo& renderInfo) const void Drawable::draw(RenderInfo& renderInfo) const { - // OSG_NOTICE<<"Geometry::draw() "<getVertexBufferHint()==DisplaySettings::VERTEX_ARRAY_OBJECT); _forceVertexBufferObject = _forceVertexArrayObject || (_isVertexBufferObjectSupported && (ds->getVertexBufferHint()==DisplaySettings::VERTEX_BUFFER_OBJECT)); + OSG_NOTICE<<"_forceVertexArrayObject = "<<_forceVertexArrayObject<