Fix inverted check for 16-bit indices

This commit is contained in:
scrawl 2016-02-19 14:59:47 +01:00
parent e2dc46c92e
commit 7071d286e8

View file

@ -219,7 +219,7 @@ namespace Terrain
osg::ref_ptr<osg::DrawElements> buffer; osg::ref_ptr<osg::DrawElements> buffer;
if (verts*verts > (0xffffu)) if (verts*verts <= (0xffffu))
buffer = createIndexBuffer<osg::DrawElementsUShort>(flags, verts); buffer = createIndexBuffer<osg::DrawElementsUShort>(flags, verts);
else else
buffer = createIndexBuffer<osg::DrawElementsUInt>(flags, verts); buffer = createIndexBuffer<osg::DrawElementsUInt>(flags, verts);