|
From: Enrico B. <de...@se...> - 2004-05-28 13:51:55
|
thanks Gerrit, your help was really useful! Finally i've got the multitexture running, but now i have another trivial problem... How do i retrieve the camera position? I am using a SimpleSceneManager and i saw that the position of the camera is private. With no facility to query that state... How can i bypass the problem? Thank you enrico Il ven, 2004-05-28 alle 12:58, Gerrit Voss ha scritto: > 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 > |