How to easily flip OpenGL images 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
iPhone
GLubyte *brushData2 = (GLubyte *) malloc(width*height *4);
for(int i=0;i<height;i++)
for(int j=0;j<width*4;j++) {
brushData2[(height-1-i)width4 + j]=brushData[iwidth4+j];
}
free(brushData);
How to easily flip OpenGL images right-side up?