Cannot read GL_DEPTH_COMPONENT using QOpenGLWidget
Solved
General and Desktop
-
Re: Cannot read GL_DEPTH_COMPONENT using QOpenGLWidget
Hi all, I have similar problem. The depth buffer does not seem to be accessible outside paintGL() in QOpenGLWidget. The glReadPixels for GL_DEPTH_COMPONENT delivers plausible z value if I try to invoke it within paintGL(). But the same call fails outside of paintGL() (GLGetError returns GL_INVALID_OPERATION which means no depth buffer)
-
The issue is solved. See https://www.opengl.org/discussion_boards/showthread.php/200495-Cannot-read-GL_DEPTH_COMPONENT-using-QOpenGLWidget-outside-of-paintGL()-function?p=1290643#post1290643 for explanations