[osg-users] Check if sampler2D is valid in fragment shader

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Tue Jan 3 05:55:46 PST 2017


Hi, yes there is:

Simply assign one Program with shaders handling texturing and the 
non-texturing variant at the appropriate state-sets. Be sure to share 
the programs (don't create a new one per instance) to keep performance up.

I can create a minimal example if you're stuck with this.

Cheers
Sebastian
> Hi Sebastian,
>
> I have used the last openscenegraph stable package in ubuntu (version 3.2.3 - https://launchpad.net/ubuntu/+source/openscenegraph), and there is no setDefine() method in osg::StateSet (only for 2.4 and newer). There is a different way?
>
> Cheers,
> Rômulo
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69840#69840
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list