Re: [osg-users] State changes causing huge drop in framerate

2011-04-07 Thread Fred Smith
hybr, I am not running a debug build. Just create a scene graph with 100 geometries, and attach a texture attribute to the stateset of each geometry. Now compare the framerate with the same scene graph, no stateset created, but a draw callback set up inside which you call

[osg-users] State changes causing huge drop in framerate

2011-04-06 Thread Fred Smith
Hi, I have a very large scene graph where I have many geodes. Each of this geode has a stateset with a GPU program defined on it, contianing a vertex and a fragment shader. The GPU program instance is unique for my whole application - I am not recreating the program over and over again for

Re: [osg-users] State changes causing huge drop in framerate

2011-04-06 Thread J.P. Delport
Hi Fred, maybe have a look at this: http://www.bricoworks.com/articles/stateset/stateset.html I remember something like that state equality is only tested using pointers and not internal data. So, maybe you'll have to explicitly share state (that getOrCreate won't do). Sorry I can't

Re: [osg-users] State changes causing huge drop in framerate

2011-04-06 Thread Fred Smith
Hi JP, J.P. Delport wrote: Hi Fred, maybe have a look at this: http://www.bricoworks.com/articles/stateset/stateset.html I remember something like that state equality is only tested using pointers and not internal data. So, maybe you'll have to explicitly share state (that

Re: [osg-users] State changes causing huge drop in framerate

2011-04-06 Thread Sergey Polischuk
Hi, Fred When it comes to gl calls, state checks attributes values with state cache. You will never know for sure where time goes without profiler, so use one :) 64 to 30 fps change is in release mode with optimizations? If it is debug build difference may be almost not noticable with