Drawing to exact pixels?

BlitzMax Forums/OpenGL Module/Drawing to exact pixels?

Jaquio1319(Posted 2007) [#1]
How would I code OpenGL directly and have it write to exact screen pixels? I found a newbie guide to OpenGL but that didnt feature it. Drawing a point to 0,0 would not draw a point at the first pixel on the screen.

I'm new and want to start off by learning basic opengl... but the way it handles drawing locations confuse me.


H&K(Posted 2007) [#2]
Wow, There was an answer posted on your last question about this, but it seems to have gone.
As far as I remember it was on the lines of

"You use a quad, and you position it so that it appears one pixel big"
but it might have been
"You make a billboard with a texture the same size as the screen, then you put the billboard so it takes up the screen, then you edit the texture"
Either way the anwer was No... well you can but its a pain in the behind


ImaginaryHuman(Posted 2007) [#3]
Use an orthographic projection and position a pixel at the middle of a pixel ie 14.5,27.5 is the middle of the 14,27 pixel.

If you are using a 3d perspective projection you can still switch to orthographic temporarily, draw your precision stuff, and switch back to 3d. Another option is that second one mentioned, make a quad filling the screen using a texture the exact size of the screen (or texture coords that match) and then edit the texture.