Hi Michael, To do multi-texturing you simply apply multiple texture coordinate arrays to the osg::Geometry, one for each unit you are using use geometry->setTexCoordArray(unit, array);
Then on the StateSet you set up the textures on each unit you do stateset->setTextureAttributeAndModes(unit, texture, osg::StateAttribute::ON); As for you pattern, I'm not quite sure what your after. You'll just need to set up you tex env blending, texture borders and texture coordinates approrpriately. Or perhaps just break your geometry up into segments or use a single texture atlas. I can't really point you in any particular direction though without knowing what your after. Sit down with an OpenGL docs to help guide yourself through it all. Robert. On 2/13/07, Michael Aulhorn <[EMAIL PROTECTED]> wrote:
Hey all! I have a simple program that creates a flat geometry with 16 vertices. Now I want to apply 4 textures on it. One texture works of course very well, but I don't know how to do this: +---+---+---+ | 1 | 2 | 3 | +---+---+---+ | 4 | 1 | 2 | +---+---+---+ | 3 | 4 | 3 | +---+---+---+ 1..4 = different textures + = vertices I How has the osg::Vec2Array*'s to look like to achieve multiple textures? I think every texture needs an texture array which has to be applied to this geometry, right? And every texture array got the exact amount of elements as the geometry got vertices, right? My approach fails. I tried to apply 2 textures but the only thing i get is a black plate with some red (one of my textures is red) fuzzy points. Thanks for your help. Michael _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
