Hi Alaxendre, You can disable culling via viewer's master Camera, osg::Camera subclasses from osg::CullSettings that has a whole collection of various settings that affect what is done during the cull traversal.
However, I believe you proposal of disabling culling just to get a constant framerate is perverse. There are many better ways to limit framerate to a target without needlessly burning CPU cycles. Disabling culling will also lower framerate in all but exceptional circumstances. It's such a bad idea I wasn't in two minds to tell you about CullSettings as you really need to look elsewhere to fix your problem. A proper fix is to change the viewer main loop so that it limits to a target frame rate. There are OpenGL extension that can help with this, but it could be something as simple as enabling vsync. You don't give an information about the framerates you are working with, what your targets might be, what hardware you are working with, or how you are setting up your viewer so there is a real limit on how specific we can be with recommendations. Robert. On 17 December 2015 at 18:13, Alexandre Vaillancourt < [email protected]> wrote: > Hi All! > > In relation to my post > http://forum.openscenegraph.org/viewtopic.php?t=15389, I'd like to try > something: disable OSG's frustum culling of geometries and send the whole > scene graph to the GPU. > > An issue I'm struggling with now is that when the viewer is in a certain > location in the simulation, _a lot_ of objects need to be displayed, and > when the viewer looks in the opposite direction, not a lot of stuff has to > be displayed. When comparing these two situations, the cull and draw phases > time vary quite a lot, and the GPU seems to be waiting for some work to do. > This variation in frame time prevents us from setting a "target" frame rate > that could be achieved in most situations during the execution of the > simulation. > > By disabling the culling computation and simply sending everything to the > GPU, I feel we'd achieve a "constant" frame rate. (I would expect a > constant low cull time, a constant higher draw time, and variable GPU time, > which would not be visible.) > > I'm aware that this might not be the most appropriate solution, but I'd > still like to give it a try. > > > Thanks! > > -- > Alexandre Vaillancourt > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

