pyopengl

How do I make 3D work in pyglet?

I was trying to create using OpenGL, Python and pyglet, a flat triangle in a 3D space, I saw some tutorials on the internet, ... have the code appears this: And when I try to rotate the scenario it happens: Does anyone know where I'm going wrong?