navid_ad wrote:
> I'm doing a research and I need to change RGB value of some pixels on
> screen runtime. As far as I know, glGet/SetPixel() just have access to
> the current application framebuffer but not the whole screen, but I
> need to be able to change any pixel on screen even the ones that
> belong to other applications.
There is no glGetPixel or glSetPixel in OpenGL.
Windows API has GetPixel and SetPixel, and these (like all Windows GDI
functions) can draw to anywhere on the screen, including other programs'
windows. But if you do this, the other programs will overwrite your
pixels the next time they redraw.
To avoid this, you can capture the current screen to a bitmap, draw this
on a fullscreen window, and then draw over it. You can use OpenGL to do
the drawing, but not the screen grab.


|