Hi Sajjdul,
I used to know that the texture coordinate s,t,q all has to be between 0.0 and
1.0.
No, it does not have to be between 0.0 and 1.0. It can be any value.
For Texture1D/2D/3D, what happens outside the 0.0 to 1.0 range is
specified by the wrap mode (texture->setWrap(...)). You can set it to
REPEAT, CLAMP, CLAMP_TO_BORDER, CLAMP_TO_EDGE or MIRROR. See the OpenGL
spec for what each wrap mode does.
For TextureRectangle, the rules are different. The texture coordinates
are defined in image units, so if you want a 128x128 texture to be fully
visible on a quad, you need the texture coordinates to span the 0.0 to
128.0 range in both directions. Outside the image size range, the
wrapping mode applies like for TextureXD.
I expect the osggameoflife example uses TextureRectangle with 128x128
textures...
Check an OpenGL book for more details, this is not really specific to
OSG but is true for any OpenGL-based app.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org