Hi Peter,

To have different shaders on different components of your model you
simply assign different StateSet, each with it's own osg::Program, to
each branch that you want to inherit that shader.  The same rules
apply to osg::Program and osg::Uniform as for all other OpenGL modes
and state attributes that the OSG maps using osg::StateSet.

Robert.

On Mon, Jun 7, 2010 at 12:00 AM, Peter Bear <[email protected]> wrote:
> Hi, I was wondering how models have shaders applied in OSG. Yes I know 
> normally a 3d modeler would know this, but I'm a programmer, not a modeler. 
> More specifically I am wondering how shaders are applied to certain parts of 
> models. An example of this would be applying a shader to say, the metal part 
> of a seat, and another shader to say, the fabric/leather part of a seat. This 
> is something which I'm not sure if it directly applies to the programming end 
> of making an application, and I would really just like to know how it's done 
> in general with OSG.
>
> Thanks,
> Peter
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=28619#28619
>
>
>
>
>
> _______________________________________________
> 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