I have a strange problem with reading values from zBuffer. When i start my application everything works fine untill I enlarge size of the window.
When I get resize event I set up new viewport values (by calling glViewport)
After that, when I call:
glReadPixels(x, y, 1, 1, GL_DEPTH_BUFFER_BIT, GL_FLOAT, floatPtr);
with x,y outside the previous viewport it doesn’t set anything in floatPtr or it sets incorrect values.
I’m running Windows XP [Version 5.1.2600]
My graphics card: ATI Radeon X300/X550/X1050 Series
Drivers: Catalyst: 09.03 OpenGL Version: 188.8.131.5243
My project is in c# and I’m using tao wrapper.
Has anyone experienced similar problems with ATI cards? My program works fine with nVidia.
Should I do something more than just setting viewport and then render my scene like always after I get resize event?
Thanks for any help.