Only disable display lists if using VBOs.
(Otherwise we fall back to very slow submission)
This commit is contained in:
@@ -330,9 +330,10 @@ public:
|
|||||||
colors->push_back(osg::Vec4(1, 1, 1, 1));
|
colors->push_back(osg::Vec4(1, 1, 1, 1));
|
||||||
|
|
||||||
osg::Geometry* geometry = new osg::Geometry;
|
osg::Geometry* geometry = new osg::Geometry;
|
||||||
geometry->setUseDisplayList(false);
|
if (useVBOs) {
|
||||||
if (useVBOs)
|
geometry->setUseDisplayList(false);
|
||||||
geometry->setUseVertexBufferObjects(true);
|
geometry->setUseVertexBufferObjects(true);
|
||||||
|
}
|
||||||
|
|
||||||
geometry->setDataVariance(osg::Object::STATIC);
|
geometry->setDataVariance(osg::Object::STATIC);
|
||||||
geometry->setVertexArray(vertices);
|
geometry->setVertexArray(vertices);
|
||||||
|
|||||||
Reference in New Issue
Block a user