Flipping an image using a one dimensional array of characters.

Posted by Jeff on Stack Overflow See other posts from Stack Overflow or by Jeff
Published on 2010-06-11T07:22:48Z Indexed on 2010/06/11 10:33 UTC
Read the original article Hit count: 138

Filed under:
|
|

I have the data of an image loaded into memory as a one dimensional array. Since I'm trying to use OpenGL to draw it, and since it reads from the bottom up, I want to try and flip the elements of the array before they're sent to OpenGL. Maybe there's a way to tell OpenGL to read from the top to the bottom? Anyways, I tried using a few methods of sorting arrays and they also flip the image horizontally, which is very much like the original problem. So can I flip the data only one way?

© Stack Overflow or respective owner

Related posts about c++

Related posts about opengl