drawPixel problem

I am trying to draw pixels directly into frame buffer. I can do draw to a default starting position (0,0) by use glDrawPixels().

What I should do if I want to draw to a specific position? I tried glRasterPos2i, but it doesn’t work like what I thought? So my questions is how to move the “pen” to a specific position, need I set any flags?

Can anyone help? Thanks

You control the pen position with glRasterPos* but the way the pixels are written to the framebuffer depend on other opengl states.For more info check the glDrawPixels manual page(‘man glDrawPixels’ or http://www.xfree86.org/4.2.0/glDrawPixels.3.html )

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.