Archived

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

Don_PhrostByte

upside-down textures

Recommended Posts

Hello, I''m trying to load textures with DevIL''s ilutGLLoadImage(), but it seems to be loading them upside-down. Anyone know how to flip an opengl texture after it''s been loaded? This is causing problems with md2 command lists, you get a head for a chest and arms for legs :D

Share this post


Link to post
Share on other sites
hmm... sounds like your texture coords are flipped (I''m pretty sure that DX and OpenGL use a different mapping scheme, so make sure it''s not a mix up like that ) It shouldn''t be a problem with DevIL, ''cause I use it for my textures in GL and it works great

Share this post


Link to post
Share on other sites
Quote from my code:

text_coord_pointer[ i ].v=1.0f-(float)file_text_coord_pointer[ i ].v/(float)file_header.skinHeight;

Share this post


Link to post
Share on other sites