Igor Lebedev wrote:
Hi,
Oh, i thought indexed vbo is fastest. I just wanna try alternate, faster method.
For Indexed VBO's, you don't use IndexArray's at all. Instead, you'll
use one of the DrawElements primitive sets (look in the osggeometry
example for how these work). These allow you to specify a single index
array that applies to all of your attributes (vertices, normals, texture
coordinates, etc.)
Really, you shouldn't be touching IndexArrays at all if you're trying to
go fast.
As for the alternate method, are you trying to use interleaved arrays
(as in glInterleavedArrays)? I'm honestly not sure if OSG supports
those at all. There seems to be a call to it in State.cpp, but I'm not
sure how you'd go about using it.
Indexed VBO's are quite fast, and if you use them, you won't have to go
through the process of interleaving all of your vertex attributes manually.
Also, my target of using osg - is make LightWave bones\animation import. I
believe, i need indices for bones. Am i wrong?
Again, that's an entirely different kind of indices :-)
Usually, you'll use a generic VertexAttribute array for those (this lets
you have up to 4 bone indices per vertex). You might want to look at
osgAnimation and the examples for clues about this.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org