Jump to content
  • Advertisement
Sign in to follow this  
kavitha

OpenGL texture coordinates !!

This topic is 4793 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, is there a way to flip the texture coordinates adopted by OpenGL to be same as DirectX way !!. i am mapping a 2d texture using glTexImage2D. rendering a given texture, i find it is flipped upside down. when viewed thru' DIRECTx renderer, itz fine... thanks, kavitha

Share this post


Link to post
Share on other sites
Advertisement
Hi,
Try this
glMatrixMode(GL_TEXTURE);
glScalef(1,1,-1);
bye

Edit: looool just one second !! :D

Share this post


Link to post
Share on other sites
Yeah, try glEnable(DX_ADDRESS_UVW)...j/k mate.

On a more serious note, either flip the bytes of your source image before uploading them to the texture object or scan through your V texture coordinates while subtracting 1.0 from each, assuming that they're clamped to the [0, 1] range that is.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!