PDA

View Full Version : Why is image shrunk?



doggle
03-18-2004, 10:53 PM
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

03-19-2004, 05:14 AM
What do you mean by "shrunk"? Smaller than you'd have thought, smaller than the image as displayed in your paint package, lines of pixels missing?

A screenshot would be helpful.