Hello,
I can’t find what is wrong on ATI cards. On nvidia I have no problem.
Maybe you will have an idea…
I have 3 views :
- a 2D (ortho) view on the left
- two 3D (pers) view on the right, one above the other.
The model is drawn on the 3 views and the 2D view shares the display lists.
When I close one 3D view, the remaining view takes all the place on the right of the 2D view.
Problem : glReadPixels returns 0 where the closed 3D view was. So on the half of the view it returns 0 and on the other half it is correct.
I saw with gDebugger that the depth buffer is wrong on the half of the view.
I have not this problem on nvidia.
I debugged on 2 pc, one nvidia and one ati : they use the same handles on opengl contexts.
The only difference in visual studio debugger is the “unused” member in the HGLRC structure : it is always 0 on nvidia, and never 0 on ati. But I don’t know the meaning of this variable :
on nvidia : HGLRC__* hGLContext { unused=0 }
on ati : HGLRC__* hGLContext { unused=973096704 } // and other values
I do a wglMakeCurrent before using glReadPixels to be sure.
There is no error with glGetError() and glCheckFramebufferStatus(GL_FRAMEBUFFER).
It seems that something is not well initialized or updated for ATI but I don’t know what…
If you have an idea…
Thanks in advance.