1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00

Use display list to render navmesh

Slightly improves performance of massive navmesh rendering.
This commit is contained in:
elsid 2019-03-10 19:08:30 +03:00
parent 849f2078c1
commit 4395a92c35
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -102,7 +102,7 @@ namespace SceneUtil
osg::ref_ptr<osg::Geometry> geometry(new osg::Geometry);
geometry->setStateSet(stateSet);
geometry->setUseDisplayList(false);
geometry->setUseDisplayList(true);
geometry->setVertexArray(mVertices);
geometry->setColorArray(mColors, osg::Array::BIND_PER_VERTEX);
geometry->addPrimitiveSet(new osg::DrawArrays(mMode, 0, static_cast<int>(mVertices->size())));