Hi JS,

I will declare osg::Uniform on root node's stateset as you said.

Thanks so much.
Regards.

Ümit Uzun


2009/10/30 Jean-Sébastien Guay <[email protected]>

> Hi Ümit,
>
>
>  My last question is, I have declared;
>> uniform sampler2D diffuseTexture;
>> in my fragment shader, although I didn't bind it to osg::Uniform in my
>> main application, I can sample my texture from my shader in Unit 0. Do you
>> think it is weird or not?
>>
>
> You are relying on the value being set to 0 when it's undefined, which is
> not reliable. You should set it correctly. But as I said, you can set it
> once on the root node of your scene if that's sufficient for you. No need to
> set a uniform with the same name and the same value on every stateset of
> every model!
>
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
> _______________________________________________
> 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