Archived

This topic is now archived and is closed to further replies.

Noodles

upside down texture

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites