Depth buffer issue and glReadPixels?

I am not sure what is going on, but if I run in window mode with SFML, and do ray picking I get a Z = 1 value returned from glReadPixels all the time. If I run fullscreen I get .7 or some value that works and my picking returns correct results… Have no clue what could be causing this any ideas?

Thanks

No one here has seen this issue before?

I tried the same code now with FreeGLUT in a window mode and works fine, but not SFML. Anything with RC in the window creation cause this to happen vs. fullscreen setup?

Thanks!!!

Do you explicitly ask for a depth buffer, at context creation time ?

I do in my settings but not sure how SFML goes about the setup behind the scene…