Original Post
Hi,
I have written a Qt GUI application in Linux which contains 4 OpenGL windows. Every window has it's own OpenGL stuff in it, means every window has it's own render function. I need the depth values from every OpenGL window and I'm retrieving them with glReadPixels(). The problem is that I get wrong depth buffer results when I'm requesting the value of one OpenGL window. Afaik the depth buffer is implemented in hardware so my OpenGL windows are sharing the same depth buffer. I think the problem is that one OpenGL window is overriding the depth value of one other window. So how do I get the depth value of one specific window?
I have written a Qt GUI application in Linux which contains 4 OpenGL windows. Every window has it's own OpenGL stuff in it, means every window has it's own render function. I need the depth values from every OpenGL window and I'm retrieving them with glReadPixels(). The problem is that I get wrong depth buffer results when I'm requesting the value of one OpenGL window. Afaik the depth buffer is implemented in hardware so my OpenGL windows are sharing the same depth buffer. I think the problem is that one OpenGL window is overriding the depth value of one other window. So how do I get the depth value of one specific window?