View Full Version : Texturing problems;

12-03-2002, 01:07 PM
I have some problems texturing my model (an airplane):
When I try to texture wings (almost all in ZOX plane)
I get some weird output - it seems that texture is ONLY aviable in YOX plane and it maps stright on wings - from side, not from top. How to make it rotated 90deg around OX axis, or how to make OpenGL know it textures in ZOX plane. I tried glTextCoord3f as well as glTexCoord2f, with my calculated coords.

12-03-2002, 01:39 PM
You're using texture coordinate generation (based on vertex position) to texture map, right?

The way that works is that GL takes a position (X, Y, Z), does a computation (based on how you tell it to do texture coord generation), and multiplies the result by a matrix. The generation scheme you're probably just takes the X and Y coordinates of the position and uses them (with a scale, perhaps).

You have set this up, either explicitly (with calls to glTexGen) or implicity (by using defaults). To change which input position coordinates are applied to the output texture coordinates, all you need to do is make the appropriate glTexGen calls. The glTexGen docs (at least, the MSDN ones) have a pretty good explaination of how this works.