Hello,

I imagine this is pretty common, I'm just looking for a few hints of how 
to optimize things.

Our apps need to display cables (and most of the time, a large number of 
them). The cables themselves are controlled by a physical simulation 
which gives us a set of transforms for the ends of each segment of a cable.

For now, we are creating some geometry (quad strips, specifically) to 
display the cables, and assigning texture coordinates to that geometry, 
on the fly. This is needed because if, for example, a cable is 
lengthened (because it's being spooled out of a pulley system for 
example) the texture shouldn't stretch over it. Similarly, if the 
physical simulation subdivides the cable into more segments than it was 
in the last frame, we need to have correct texture coordinates to 
(hopefully) make the fact that the cable now has more, shorter segments 
invisible to the user.

I know the cable display needs to be optimized because if I just set the 
cables' nodemasks to 0, the draw times go from 6.6ms to 2.2ms (for the 
same view). And there are not *that* many cables... There's a lot of 
other geometry in the scene which is still drawn in the 2.2ms time...

So I would appreciate some pointers. I would have assumed quad strips 
are pretty fast, so perhaps something else is the problem?

There's the fact that the geometry is dynamic, which could mean that OSG 
is trying to recreate display lists each frame, but I tried 
setUseDisplayList(false) on the geometry and the cables just did not 
display anymore... Is there something else I need to do in that case?

Thanks in advance,

J-S

-- 
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to