glTranslate and glDrawPixels

Can you translate an object drawn with glDrawPixels? Im trying, and it has no effect.


What do you mean, exactly?

Use glRasterPos2i()

The rasterpos is multiplied by the current modelview matrix on submittal, so yes. But you won’t get a perspective effect just drawing pixels obvioulsy, use a textured quad if that’s what you want.

Yeah, since my post Ive discoverd glRasterPos…but Ive also read the issue of it having no effect if the origin is offscreen. Ive read of glWindowPos extension as well…but not pursued it yet.

My issue is that of scrolling a bitmap. Obviously Im using drawPixels to render. I didnt anticipate it being difficult to translate the image on the scroll handler…but it hasnt come easily.

Thanks for all your input.

See the OpenGL official FAQ, accessible from the menu on the main page :

Maybe you should consider putting the image in a texture and then use the texture matrix to manipulate it?