Hi Otto, To use VBO's in OSG, you just need to set up an osg::Geometry as you normally would and then call:
geometry->setUseDisplayList( false ); //Disable display lists geometry->setUseVertexBufferObjects( true ); //Enable VBO After that everything is handled under the hood for you, you can look at the osgTerrain library or the osgdrawinstanced example for examples. Thanks! Jason On Wed, Jan 6, 2010 at 9:12 AM, Otto Cologne <[email protected]> wrote: > Hi, > > I'm in the process of rewriting a program I did earlier but this time using > OSG. One part contained rendering a large amount of lines which would be > selected by various selection tools. For that I used VBO's and a bit mask. > The rendering function (after all the initializations) then looked like this > > > Code: > > for ( int i = 0; i < m_countLines; ++i ) > { > if ( m_selected[i] ) > glDrawArrays( GL_LINE_STRIP, getStartIndexForLine( i ), > getPointsPerLine( i ) ); > } > > > > > Now i'm reading through the osg doc and the tutorials, but the coverage on > VBO's is rather thin. I'd appreciate some hints on how to do it if the > functionality exists or if I have to write my own osg node. > ... > > Thank you! > > Cheers, > Otto > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=22147#22147 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

