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/

Reply via email to