I read a windows BMP image, the bit map is untouched, and use following code to draw it in a OpenGL window:
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
glClear(GL_COLOR_BUFFER_BIT);
glRasterPos2i(1, 1);
glDrawPixels(width, height, GL_BGR_EXT, GL_UNSIGNED_BYTE,
pixels);
glFlush();
the image is strangely shrunk!
I didn’t use glPixelZoom(…) or any pixel transfer operations.
Would anyone tell me the reason that can cause this problem?
Thank you!
Doggle