[PyOpenGL-Users] PyOpenGL and stereo
Brought to you by:
mcfletch
From: Jack J. <Jac...@cw...> - 2002-05-17 13:13:01
|
Is anyone using stereo with PyOpenGL? I've had absolutely no success with it, so far. I started out with a rather complex program, where my PyOpenGL code was basically embedded in a large C-based OpenGL infrastructure (basically my Python code is only the redraw callback, all the double-buffer and left-right juggling and perspective matrices and such are handled for me in C). This worked fine for the mono case, but when I ran the program in stereo I got to see the both viewpoints sort-of interspersed, with a lot of flickering and not in sync with the glasses. I've slowly worked back, taking out bits and pieces of the system to narrow down the culprit, and I'm now at a minimal PyOpenGL GLUT-based program, which is basically the PyOpenGL GLE example with stereo turned on and the do_display() routine replaced by glDrawBuffer(GL_BACK_LEFT) glClearColor(0, 0, 1, 0) glClear(GL_COLOR_BUFFER_BIT) glDrawBuffer(GL_BACK_RIGHT) glClearColor(1, 0, 0, 0) glClear(GL_COLOR_BUFFER_BIT) # [see below] glutSwapBuffers() and I see a blue background, nothing more. However, if I wiggle the mouse (which causes draw events, because the original GLE.py example code used that to rotate the tube) I see flashes of red. To make matters more unintellegible, if I insert drawing code at the [see below] I do see what I draw here, but against the blue background! So, what I see is a non-stereo image consisting of the background color of the left buffer and the graphics in the right buffer??!? None of these problems exist with C OpenGL code, so I tend towards blaming something PyOpenGL does for this. What would be really helpful to me at this moment is a PyOpenGL script that is known to work, at least for someone on some machine, at some time:-) This is all with PyOpenGL from the CVS HEAD (built with swig 1.3.9, later versions don't seem to work) with a few mods needed to make it compile (missing semicolons!). The machine is a dual 1.6GHz Pentium Linux box (2.4.9 kernel) with an ATI Rage XL graphics board. Please reply to me directly (as well as possibly ccing to the list if it's deemed of general interest), I'm not on this list yet, -- - Jack Jansen <Jac...@or...> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - |