PDA

View Full Version : glReadPixels and Win2000



Andrea Doimo
11-13-2000, 07:39 AM
Hi, while using win98, I used the following line to read the Zbuffer at the mouse coordinates:

glReadPixels(mousex,mousey,1,1,GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,point);

It worked fine ...
Now I use Win2000 with the latest G400 drivers, and something strange happens...
The doublebuffering is broken, that is one frame is the FIRST frame ever rendered and the other frame is the actual frame... Very psychedelic! http://www.opengl.org/discussion_boards/ubb/smile.gif

One question... WHY ????

Pauly
11-13-2000, 11:06 AM
My G200 OpenGL programs flickered the screen to death in Win2k fullscreen. Use Win98 until they fix the drivers/windows http://www.opengl.org/discussion_boards/ubb/smile.gif

DJ Tricky S
11-13-2000, 01:07 PM
Here is what I discovered; when running on a Matrox card, you can get rid of the psychedlic spazziness by calling wglMakeCurrent() with your current render & device contexts prior to your call to SwapBuffers(). In my game I wrapped the call to SwapBuffers(), and so on Matrox hardware I use a special swapping function that calls wglMakeCurrent() before the call to SwapBuffers() - since calling wglMakeCurrent() prior to SwapBuffers() broke on other cards. ::sigh::

Andrea Doimo
11-14-2000, 12:50 AM
Originally posted by Pauly:
My G200 OpenGL programs flickered the screen to death in Win2k fullscreen. Use Win98 until they fix the drivers/windows http://www.opengl.org/discussion_boards/ubb/smile.gif

This happens to me only if I use glReadPixels.
If I comment it out the program runs well...

Is there another way to read the Zbuffer ?


[This message has been edited by Andrea Doimo (edited 11-14-2000).]

Andrea Doimo
11-20-2000, 02:21 AM
Originally posted by DJ Tricky S:
I use a special swapping function that calls wglMakeCurrent() before the call to SwapBuffers() - since calling wglMakeCurrent() prior to SwapBuffers() broke on other cards. ::sigh::

It works... Can you explain how you fixed the problem with the other cards? What does your "special swapping function"?

Thanks