Re: [osg-users] Changing vertex color without calling setColorArray

2011-10-07 Thread Jean-Sébastien Guay

Hello Dan,


   The main problem with calling setColorArray to update the vertex colors is 
that it visibly slows the framerate. Is there any way around completely 
resetting the color array on the geometry every frame (update)?


Calling setColorArray() calls dirtyDisplayList(), which is what is 
actually needed in order for the display lists to be recompiled and 
ready to use with your changes.


If you are updating the color array (or indeed any array in the 
Geometry) often, then you should just disable display lists by calling 
setUseDisplayLists(false). Also you can experiment with 
setUseVertexBufferObjects(true), for some uses vertex buffer objects are 
faster than plain vertex buffers but in some cases they are slower.


Display lists are for static geometry. If your geometry is changed 
often, the overhead of compiling the display list will severely affect 
frame rate as you have seen.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Changing vertex color without calling setColorArray

2011-10-10 Thread Dan West
Thanks, that makes sense. I'll give those a shot.

I'm also having another issue that's proving to be more annoying now. It seems 
to be the same as the problems in this thread: 
http://forum.openscenegraph.org/viewtopic.php?t=401

Thanks for the help. I'm going to make a new post as this is a separate issue.
~ Dan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43303#43303





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