View Full Version : glReadPixels....

07-26-2000, 01:28 PM
I am trying to write a program in GLUT and I wanted to know if I use glReadPixels in my program (if I don't init a window) will it read pixels from another opengl program's framebuffer? If not is there any way I can do this? read the screenpixels from a separete program?

07-26-2000, 04:44 PM
I really need to know if it's possible. I have a deadline...

07-26-2000, 10:15 PM

uhm. this is very implementation specific. What a window manager does with an applications buffer when a window doesn't NEED it for display is entirely up to the WM implementation. Even on IRIX, for example, I
ve managed to inadvertantly grab my screensaver in an opengl program when I was reading pixels and the screensaver kicked in. (The argument is that the app doesn't need the buffer allocated to it, since it can't be seen, anyway).

So! If you had another application overlapping your opengl's window, then you MIGHT be able to grab the other window's display. MIGHT. Oh, and you definately can't do it if you don't init a window, anyway. (How's it going to grab from a drawable if there isn't one??)

at the end of the day, the answer is: possibly, but don't count on it, but more importantly: no, because it's beyond the scope of OpenGL, and critically: it is therefore platform dependent.