Re: [osg-users] ViewerBase::frame() method slow after changing the color of a geometry

2017-08-18 Thread Gianni Ambrosio
Hi, just an update that can be useful for others. As suggested I split the original huge geometry in chunks (1-3 vertices each works fine) and it works fine now. Thanks again, Gianni -- Read this topic online here:

Re: [osg-users] ViewerBase::frame() method slow after changing the color of a geometry

2017-07-21 Thread Gianni Ambrosio
Thank you very much Robert, I will do as you suggested. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71302#71302 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] ViewerBase::frame() method slow after changing the color of a geometry

2017-07-21 Thread Robert Osfield
Hi Gianni, On 21 July 2017 at 11:32, Gianni Ambrosio wrote: > I tried what Lionel suggested but in fact the geometry generation is much > more slow now. > Anyway, since I suspected that "dirtyDisplayList()" is the cause of the > delay, I tried to remove that line but

Re: [osg-users] ViewerBase::frame() method slow after changing the color of a geometry

2017-07-21 Thread Lionel Lagarde
If you use display lists, you have to tell OSG that it has to re-build it. If you use vertex arrays, colors->dirty() should be enough. On 21/07/2017 12:32, Gianni Ambrosio wrote: Thanks Lionel and Robert for the quick reply. I tried what Lionel suggested but in fact the geometry generation

Re: [osg-users] ViewerBase::frame() method slow after changing the color of a geometry

2017-07-21 Thread Gianni Ambrosio
Thanks Lionel and Robert for the quick reply. I tried what Lionel suggested but in fact the geometry generation is much more slow now. Anyway, since I suspected that "dirtyDisplayList()" is the cause of the delay, I tried to remove that line but without it I cannot see the new color. Now, is

Re: [osg-users] ViewerBase::frame() method slow after changing the color of a geometry

2017-07-21 Thread Lionel Lagarde
I don't know about the double frame but the default for geometries (drawables in fact) is to use OpenGL display lists (depending on the OSG compilation). OpenGL display lists creation takes time. The dirtyDisplayList method forces OSG to re-create the OpenGL display list. The solution is