Only disable display lists if using VBOs.

(Otherwise we fall back to very slow submission)
This commit is contained in:
James Turner 2014-02-19 15:10:48 -08:00
parent b4f4ef9c5b
commit 3b5665fe92

View 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);