All OpenGL objects should be created before (or during) the first frame, by the GLObjectsVisitor. Set a breakpoint in it and make sure it is running in your application.

You might find, as I do, that GLObjectsVisitor is running, but you still experience some frame stalls when new pieces of the scene graph come into view. I have never had time to track this down. I suspect it is the device driver being overly aggressive with freeing up GPU memory.

Only way to be sure this isn't a bug in GLObjectsVisitor would be to set a breakpoint in it to make sure it runs. After it completes, set a breakpoint on the call to glNewList and glTexImage2D (and related functions) and make sure they are not getting called.

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466



Guy Volckaert wrote:
I've bee experiencing momentary frame drops when I rotate my camera in my 
scene. After look at the osg code, I noticed that many of the opengl objects 
are created during runtime and not when the model is loaded. For example, 
opengl texture objects are only created when the Texture2d::apply() is 
traversed. A drawable display lists is only created when its 
Drawable::drawImplementation() is called.

I suspect that, in case, these runtime object creations are the cause of my momentory frame drops.
Is there a way to precreate all open objects located define in a scene graph? 
That way I can confirm my suspicion.

One way would be to have a VERY big camera frustum that encloses the entire scene and then renders one frame, but that seems a little *hacked* to me. I am trying to look for an alternative and better way to do that.
Guy,

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





_______________________________________________
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

Reply via email to