Hi,
i'm trying to use vertex arrays in my own drawable. For some reason it crashes
in the glDrawArrays call. The draw implementation is some code that works in
another program of mine which uses pure opengl.
Code:
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glVertexPointer( 3, GL_FLOAT, 0, &(*verts)[0] );
glColorPointer( 3, GL_FLOAT, 0, &(*colors)[0] );
for ( size_t i = 0; i < active->size(); ++i )
{
if ( (*active)[i] )
{
glDrawArrays( GL_LINE_STRIP, (*startIndexes)[i] * 3,
(*pointsPerLine)[i] );
}
}
glDisableClientState( GL_VERTEX_ARRAY );
glDisableClientState( GL_COLOR_ARRAY );
In the constructor of the drawable there is a setSupportsDisplayList( false );
For the opengl part this looks correct, the only thing i could think of now is
that it's not ok to do stuff like glEnableClientState directly but have to use
some osg state object. Any hints on how to do it correctly will be greatly
appreciated.
Thank you!
Cheers,
Otto
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=25393#25393
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org