Jim Wilson writes:

> Norman Vine <[EMAIL PROTECTED]> said:
> 
> > Jim Wilson writes:
> > 
> > > Then what does ssgTexTrans:: support?
> > 
> > It controls the texture transform
> > 
> > google( "glMatrixMode GL_TEXTURE" )
> > 
> 
> That's correct, but I haven't used that. My reading is you can apply matrices
> to rotate and translate the texture mapping coordinates.  For example if
> square is mapped to 0.45 x 0.45, 0.45 x 0.55, 0.55 x 0.55, 0.55 x 0.45 on x/y
> and you translate 0.1 on y,  it'll "move" the texture down 0.1 so that the
> mapping is now 0.45 x 0.55, 0.45 x 0.65, 0.55 x 0.65, 0.55 x 0.55.  Or you you
> rotate 90 degrees on the z axis it'll turn the texture on it's right side.

I think the answer is yes but I am not sure I follow exactly ...

The glMatrixMode(GL_TEXTURE) transforms the coordinates
within "texture space"  ie in texture2D in the UV space of the
bound texture just as the more usual matrix modes transform an
objects geometrical position

In the case of a 3D cockpit there may be a good use for this
in building the texture up but the main problem I see is still 
going to be polygon offset related, so I am suggesting that
a better approach might be to bind to textureObjects rather
then an actual texture and then build the texture object each 
frame and use the subTexture call to update the textureObject

This way there will be no polygon offset issues as there won't
be multiply layerd instruments it will all be in a single texture
bound to the face of the instrument

A cheap trick but it is fast and sidesteps some thorns

do a grep on "glMatrixMode(GL_TEXTURE)" in the glut source 
tree for lots of examples

Norman


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to