Hi Michael, Maybe there is not a perfect solution for your request, but if I understand your problem, you can also use an osg::TexMat, to transform each texture stage.. so you can assign same texture coords to your geometry (or use osg::TexGen), and apply a texture matrix to fit the textures.. Of course you also need to play with TexEnv with BLEND, or TexEnvCombine for more complex interpolation as Paul says.
Rafa. On 2/13/07, Michael Aulhorn <[EMAIL PROTECTED]> wrote:
Thanks, that helps a lot :) I don't want to put each quad in its own Drawable, because the field I want to generate will be much larger than 4x4. I want to limit the vertices that'll be displayed and to many vertices slow down the program where that piece of code will be implemented. Michael. Am Dienstag, den 13.02.2007, 12:31 -0700 schrieb Paul Martz: > The problem is that you can't turn texturing on for one quad in a Geometry > and off for the others. Texturing has to be on for all quads. So it is > difficult to answer your question because I don't know what you want to have > on the other quads. > > You can make it APPEAR that texturing is off for the other quads using > CLAMP_TO_EDGE and setting the border of your texture appropriately. > > To do this, add a border to your texture -- maybe you want it white, maybe > you want it to have a zero alpha, I don't know. But whatever you choose is > what will be applied to the other quads. Then configure the OSG texture wrap > mode for CLAMP_TO_EDGE (both S and T). Set the texture coordinates for the > other vertices so that they are outside the range 0..1. For every fragment > with (s,t) outside the range 0..1, that fragment will get textured with the > border color. > > Assuming you want other textures on the other quads, use multitexturing with > a different texture unit for each texture. (Note that you're typically > limited to four texture units on most hardware, so this will only work for > four textures.) Add a zero alpha border to all the textures, and you'll need > to set TexEnv to (I think) BLEND) to get a texture per quad. > > As I said in my previous post, you can save yourself a lot of headache by > just putting each quad in a separate Drawable with its own StateSet. :-) > > Hope this helps, > Paul Martz > Skew Matrix Software LLC > http://www.skew-matrix.com > 303 859 9466 > _______________________________________________ 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/
