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,  <[email protected]> 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
> [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