Hi Miroslav,

I think perhaps you are mixing names of things a bit so your questions
are bit open to confusion.

My best guess to what you are after is not a the texture ID but the
texture unit number that you should bind to the shader using a
uniform.  Which texture units are active in a scene graph are governed
by the StateSet's that are atttached to the Nodes and Drawables in the
scene graph, typically you could probably just assume that texture
unit 0 is active and just bind this value as a uniform.

For examples of settings up shaders with textures have a look at the
osgshader* examples.

Robert.

On Sat, May 30, 2009 at 8:09 AM, Miroslav Andel <[email protected]> wrote:
> Hi,
>
> I'm want to desaturate a model in my scene that is loaded as an ive file. I 
> have a glsl shader that does the desaturation but I need to pass the texture 
> id as argument to the shader. My problem is how to get the texture id(s) from 
> the model node.
>
> I guess I need to create a node visitor to apply the shader to all geodes in 
> the model but whats the propper way to get the texture ids?
>
> Thank you!
>
> Cheers,
> Miroslav
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=13205#13205
>
>
>
>
>
> _______________________________________________
> 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