upside down texture

Started by
1 comment, last by Noodles 23 years ago
Hi, I am experimenting with texture in D3D7. My program currently displays a texture on the screen, but it is upside down. Changing the vertex texture coordinates doesn''t seem to help. What''s wrong? Also, is there a drawing format for DrawPrimitive for drawing a quad polygon like GL_QUAD in OpenGL, would make things a bit easier.
Advertisement
Just out of curiosity, if you draw a triangle, does it point the right way? If not, your problem is either the vertex coordinates or the projection matrix (probably the former). If you say that changing the texture coordinates doesn''t help, though, then I don''t see how even the issue I just mentioned would make a difference. Hmm. The most typical reason for flipped textures is that the image format hasn''t been loaded correctly--for example, with Targa files one has to be really careful where the file specifies the origin is, otherwise your texture will be flipped. Just a few thoughts.
I think i know the answer to this one. for some reason the V (y value) for the textures in OGL are calculated from the opposite direction to those in some modelling programs. So when you are rendering a poly, where you indicate the V for the texture, try 1-V (whatever your v maybe)

hope that helps

This topic is closed to new replies.

Advertisement