Paul, Running at 120Hz is rather extreme since the human eye can't really appreciate a frame rate higher than 60Hz - OK monitors are normally rated at approx 75Hz to be flicker free, but 60Hz is "the norm". With this in mind, you might be able to hide this missed frame by simply reducing your frame rate.
PhilT -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]on Behalf Of Robert Osfield Sent: 28 April 2009 09:29 To: OpenSceneGraph Users Subject: Re: [osg-users] Multiple Shaders Performance Question Hi Paul, Different drivers manage compilation and linking in different ways on different drivers so it's hard to give any hard rules. In general making sure your scene graph is pre-compile before rendering helps avoid most problems with compiles occur during rendering. Robert. On Tue, Apr 28, 2009 at 2:46 AM, <paul1...@yahoo.com> wrote: > > I have multiple shaders. I attach one shader to the root of the scene graph. I then load in objects and attach one of another set of shaders to the root of the object and attach it to the main scene graph. When I say "attach a shader", I'm loading a fragment and vertex shader from a file and attaching them to a new Program object each time. I then attach the Program object to the object's state set. > > Is there any performance advantage to doing it this way or creating one Program object for each shader and attach these same Program object to my objects. Or should I be creating a set of StateSet's and attaching the appropriate StateSet to my object based on the Shader I want to use. > > To complicate things, I have multiple cameras used to render to multiple Frame Buffer Objects. > > What I'm seeing is a (single) missed frame when an object with a "new" shader appears in the Field of View (running at 120Hz)? > > Could OSG be attempting to "recompile" my shader? Is driver downloading the shader each time to the video card. > > Paul P. > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org