|
From: Gerrit V. <vo...@ca...> - 2004-05-28 11:02:13
|
Hi, On Fri, 2004-05-28 at 18:51, Enrico Borrione wrote: > hi all, > I am trying to add some effects to my scene, via some nice fragment > programs. > My problem is that i dunno how to bind more than one texture to a > Geometry... > If i want that say MyTexture1 is binded to texture[0], in the OpenGL > architecture, and MyTexture2 to texture[1], is it enough to say OpenSG > something like: > > beginEditCP( Mygeo, Geometry::MaterialFieldMask); > Mygeo->setMaterial(Mytexture1); > Mygeo->setMaterial(MyTexture2); > endEditCP(Mygeo, Geometry::MaterialFieldMask); > > ? ( <-- damn question mark, it looks a bit stupid there all alone, but > that was a question after all) :) not quite, OpenSG only allows one material per geometry but more than one texture per material. Attached you find our multitexture test program. It is not as pretty as the tutorials but should help to setup multiple textures. (Note, there are currently only 4 TextureCoordinate properties in the geometry, just in case you try more). regards, gerrit |