Pixel Color

Started by
3 comments, last by jag_oes 22 years, 2 months ago
Is there a way to determine the color of a pixel? This is being done in 2D in Open GL ... something like "glGetColor (0.0f, 0.0f)" that will return the color of the pixel at (0,0). Or some equivalent? Thanks
Advertisement
you can use glReadPixel(), but you should really not be using functions like this. if you want to a 2d game use directdraw with a system buffer so reads will be fast. unfortunatly reads from vram are uber slow and video cards are designed for writes to vram not reads.
Awesome, thanks a lot ... what kind of value does that return?
this is where the old RTFM comes into play.
Give me a break ... you could have told me in fewer words than that reply took ...

Thanks anyway.

This topic is closed to new replies.

Advertisement