glDrawPixels mirror

I have a pretty straight forward rendering function that uses glDrawPixels. Problem is that the image is mirrored horizontally.

glDrawPixels(256, 256, GL_LUMINANCE, GL_UNSIGNED_BYTE, static_cast<const GLvoid*>(m_Data)); 
// where m_Data is a pointer to the pixels that are unsigned BYTE's from 0-255


My only thought is that you are using data assuming that the origin is at top left whereas in OpenGL origin is at bottom left. You will need to adjust how you populate your array.

or you can use glPixelZoom(1,-1)

EDIT: errmm… horiznally? glPixelZoom(-1,1) could be a solution but i don’t have an idea what kind of mistake could result in horiznotally mirrored image. it must be something with your array (e.g. at time of loading you are filling it from last element to first:)). try to fix it, then you can try glPixelZoom(-1,1))