PDA

View Full Version : glTranslate and glDrawPixels



06-21-2004, 06:38 AM
Can you translate an object drawn with glDrawPixels? Im trying, and it has no effect.

TIA

endash
06-21-2004, 11:37 AM
What do you mean, exactly?

gumby
06-21-2004, 11:51 AM
Use glRasterPos2i()

harsman
06-22-2004, 02:43 AM
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.

06-22-2004, 04:09 AM
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.

ZbuffeR
06-22-2004, 12:35 PM
See the OpenGL official FAQ, accessible from the menu on the main page :
http://www.opengl.org/resources/faq/technical/clipping.htm#0070

dvm
06-23-2004, 01:28 AM
Maybe you should consider putting the image in a texture and then use the texture matrix to manipulate it?