[osg-users] setColorArray is slow on large model

2012-09-25 Thread Tina Guo
Hi,

I am trying to change the color of a geometry after I pick it. I use display 
list, however, when call setColorArray, it takes time to really change the 
color. I read this post http://forum.openscenegraph.org/viewtopic.php?t=9234 , 
and setUseDisplayList(false). However, after that, the manipulate of model, 
rotate, pan...becomes slow, and frame rate drops. I do not know if there's way 
to change the color of geometry with call setColorArray to avoid calling 
dirtyDisplayList(). 
... 

Thank you!

Cheers,
Tina

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





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


Re: [osg-users] setColorArray is slow on large model

2012-09-25 Thread Robert Osfield
Hi Tina,

Setting the colour array on an osg::Geometry should be quick and
shouldn't normally make rendering slow.  The fact you are finding this
suggests that perhaps you are setting up osg::Geometry to render with
OpenGL slow paths so as using indices arrays or per primitive bindings
- these are a deprecated.

I would suggest you take a step back and try to work out why you are
getting slower performance.  We can't help you too much without more
information about what the bottlenecks are and what performance you
were and are now getting.  For instance tells the hardware, OS, OSG
version, how you've compiled it (debug vs release), the model stats,
the performance stats such as update, cull, draw dispatch and draw GPU
times.

Robert.

On 20 September 2012 21:37, Tina Guo guoyiting1...@gmail.com wrote:
 Hi,

 I am trying to change the color of a geometry after I pick it. I use display 
 list, however, when call setColorArray, it takes time to really change the 
 color. I read this post http://forum.openscenegraph.org/viewtopic.php?t=9234 
 , and setUseDisplayList(false). However, after that, the manipulate of model, 
 rotate, pan...becomes slow, and frame rate drops. I do not know if there's 
 way to change the color of geometry with call setColorArray to avoid calling 
 dirtyDisplayList().
 ...

 Thank you!

 Cheers,
 Tina

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





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