Copy and Paste bug where an for() loop was repeated within itself, which

was introduced when moving across to use osg::Geometry.
This commit is contained in:
Robert Osfield
2002-07-14 08:35:35 +00:00
parent 4895b22da1
commit 32a4625e59

View File

@@ -76,20 +76,16 @@ Node *makeSky( void )
for( i = 0; i < nlev-1; i++ )
{
UShortDrawElements* drawElements = new UShortDrawElements(Primitive::TRIANGLE_STRIP);
drawElements->reserve(38);
for( j = 0; j <= 18; j++ )
{
UShortDrawElements* drawElements = new UShortDrawElements(Primitive::TRIANGLE_STRIP);
drawElements->reserve(38);
for( j = 0; j <= 18; j++ )
{
drawElements->push_back((i+1)*19+j);
drawElements->push_back((i+0)*19+j);
}
geom->addPrimitive(drawElements);
drawElements->push_back((i+1)*19+j);
drawElements->push_back((i+0)*19+j);
}
geom->addPrimitive(drawElements);
}
geom->setVertexArray( &coords );