2) when i pass the texture data to the fragment program in OGL i just
say:


 glActiveTexture(GL_TEXTURE#);

where # is the number of the texture i wish to bind as a parameter to
the fp. How can i do the same thing in OSG?  I saw a couple of
instructions sounding like activateTexture(Window *win, UInt16 texture) osg::TextureChunk [inline,static]


activeTexture(Window *win, UInt16 texture) osg::TextureChunk [inline,static]

but i don't really know if they are what i am needing. My objective is
to be able to use an instruction like:

TEX texcolor, texcoord[1], texture[1], CUBE;

and be sure that my cubemap is actually binded to texture[1].


You can use a ChunkMaterial and add TextureChunks for each texture. The order you add the texture chunks should match the numbering you use in your fragment program. So the first texture chunk will be texture[0] and so on.

--
Michael Babcock
Jim Henson's Creature Shop



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to