glPixelZoom oddities with glDrawPixels

I’m using GLUT and GL in color index mode, and I have a rectangular array of pixels with a GLubyte per pixel as an index into a colortable. I set glPixelZoom(2,2) and then call
However, it does not actually zoom, and just leaves my rectangle at its original size.
If I replace GL_UNSIGNED_BYTE with GL_BYTE, it does perform the zoom – however, then the DrawPixels takes 25 times as long, 0.2 seconds as opposed to 0.008, which is unacceptable in my application. Does anyone have any ideas as to why the zoom might be ignored?

Color index mode? That’s your problem.

It certainly sounds like a bug. Note that the reason GL_BYTE is so slow is probably that the GL_UNSIGNED_BYTE case is detected and optimized as requiring no special processing, whereas GL_BYTE is probably undergoing all sorts of crazy stuff behind your back…

  • Matt