How to easily flip OpenGL images right-side up?

Does anyone have a simple solution for loading images into OpenGL textures so they are right-side up.

I know I could simply save my images upside-down but hoped there was an easier solution around the fact that OpenGL's image texture coordinate starts in the lower-left.

Thanks,
Anthony

iPhone

Posted on Jan 21, 2009 8:12 AM

3 replies

Jan 21, 2009 11:07 AM in response to iphonemediaman

Thanks! That was what I'd planned to do but hoped to not need to duplicate my memory allocation. Given how small my texture files are though, that should be a problem.

You saved me from having to figure out the pixel re-positionings though so much thanks.

Anthony

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to easily flip OpenGL images right-side up?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.