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

Sergey Polischuk pol-ss at yandex.ru
Wed Apr 6 12:56:09 PDT 2011

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 optimizations on... i remember case when debug build spent about 30ms on culling on scene while O2 build spent 4ms on same stuff.

And with textures - i think you best bet is to share common state closer to scene root, and change only texture attributes when needed on leaf nodes. Also you can use texture atlases to get better batching, osgUtil::Optimizer can do this for you in some cases, but it can mess up some things like textures for reflections etc.


More information about the osg-users mailing list