[osg-users] TexCoords and texture unit

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Fri Nov 13 06:53:07 PST 2009


Hi Martin,

> Can I do this without a glsl shader? A set of textures dependend on one TexCoordArray?

geometry->setTexCoordArray(1, geometry->getTexCoordArray(0));

Your data will not be copied CPU-side (one tex coord array for both 
units, the ref count incremented accordingly) but they will be uploaded 
twice so it may be slower than the shader version. But if you need to be 
fixed-pipeline then you don't have a choice, if you're going to 
multitexture then you'll be sending texcoords for more than one texture 
unit. I don't think there's a way to tell the fixed pipeline "use the 
same texcoords for two (or all) texture units".

Hope this helps,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/


More information about the osg-users mailing list