From 2bb480759fe80e22b8b522067224ffdf189b9c0a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 3 Apr 2009 11:29:49 +0000 Subject: [PATCH] Merged fix in svn/trunk that avoids the building of display lists when VBO's are compiled. --- src/osg/Drawable.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 18d64730f..d6d45c4a2 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -443,6 +443,17 @@ void Drawable::dirtyBound() void Drawable::compileGLObjects(RenderInfo& renderInfo) const { + bool useVertexArrays = _supportsVertexBufferObjects && _useVertexBufferObjects && renderInfo.getState()->isVertexBufferObjectSupported(); + if (useVertexArrays) + { + if (_drawCallback.valid()) + _drawCallback->drawImplementation(renderInfo,this); + else + drawImplementation(renderInfo); + + return; + } + if (!_useDisplayList) return; // get the contextID (user defined ID of 0 upwards) for the