python-opengl icon indicating copy to clipboard operation
python-opengl copied to clipboard

Transparent cube surface, it is a bug?

Open Nanguage opened this issue 5 years ago • 3 comments

Hi, I'm a newbie of OpenGL and glumpy. When I try to run the code in chapter5, such as outlined-cube.py and textured-cube.py, I found that my cube looks like different to the images in the tutorial. It looks like has transparent surface. I do n’t know what went wrong

Here is my screenshot gif: ezgif-6-53614f765a5c

My environment:

Windows10 WSL Ubuntu 16.04
Display with Xming X11

Python: 3.7.6
glumpy: 1.0.6
pyopengl: 3.1.5
triangle: 20200404

Nanguage avatar Apr 16 '20 11:04 Nanguage

Nice animation :) Your probably did not activate the depth test that is necessary in this case.

rougier avatar Apr 16 '20 19:04 rougier

Thnaks for your response. I noticed that there is gl.glEnable(gl.GL_DEPTH_TEST) in the module textured-cube.py. I mean I have never changed its code. Is there something else I can do to activate it or debug it?

Nanguage avatar Apr 17 '20 03:04 Nanguage

Hum, weird. Can you try to run some of the glumpy examples to check if they're working?

rougier avatar Apr 22 '20 13:04 rougier