When loading a texture in OpenGL, how do I specify the origin of the data I am loading?
For example, how would I load a Targa that has it's origin at the top left instead of the bottom left of the image?
Answer
You can't, at least not directly. The origin of textures in OpenGL is the lower-left corner. You need to vertically flip your image if it doesn't match this coordinate system. So it's really an image processing problem, not an OpenGL problem.
(Alternatively, you can flip all your texture coordinates that refer to the image.)
No comments:
Post a Comment