]> git.mxchange.org Git - simgear.git/commitdiff
Only disable display lists if using VBOs.
authorJames Turner <zakalawe@mac.com>
Wed, 19 Feb 2014 23:10:48 +0000 (15:10 -0800)
committerJames Turner <zakalawe@mac.com>
Wed, 19 Feb 2014 23:10:48 +0000 (15:10 -0800)
(Otherwise we fall back to very slow submission)

simgear/scene/tgdb/SGTexturedTriangleBin.hxx

index 777ee41fc085cf81469e0040b7541514c6e8744c..bd30900e25860216f085faeb60bd70eb16b7bd64 100644 (file)
@@ -330,9 +330,10 @@ public:
     colors->push_back(osg::Vec4(1, 1, 1, 1));
 
     osg::Geometry* geometry = new osg::Geometry;
-    geometry->setUseDisplayList(false);
-    if (useVBOs) 
+    if (useVBOs) {
+        geometry->setUseDisplayList(false);
         geometry->setUseVertexBufferObjects(true);
+    }
     
     geometry->setDataVariance(osg::Object::STATIC);
     geometry->setVertexArray(vertices);