Yeah. I noticed (as you probably saw) :)

I suppose I was expecting some automatic mapping between textures and samplers depending on name. (Which, come to think of it, should be possible to do if texturechunks were named. Will ponder more on this.)

/Marcus

Andreas Zieringer wrote:
Hi Marcus,

just call

shl->setUniformParameter("SamplerName1", 0);
shl->setUniformParameter("SamplerName2", 1);
....

Where 0 and 1 is the index of your TextureChunk.
There is also an example with multitexturing in OpenSG/Source/Experimental/SHL/testSHLEarth.cpp

Andreas


Hi all,

I'm trying to do some simple bumpmapping with GLSL, but I can't figure out how to get multitexturing to work. Simply adding more texturechunks to the material does not work for me, as I always get the first texture bound to all my samplers.

I can't find anyplace where osg does getUniformLocation/setUniform for the samplers, so one assumption would be that, since they are never intialized with the actual texture unit, always have the value 0 (or GL_TEXTURE_0), which would explain my results, but then we have a rather major deficieny in opensg, which makes me worried.

Has anyone else done this? Any hints?

Best regards,
/Marcus





-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to