I'm using pyglet: http://www.pyglet.org/ to work with opengl. However, i have some problems.
My vanishing point appears in the corner of the screen (0,0) the lower left corner. The following image should show illustrate this: http://i.imgdiode.com/0wu5E0.png
On the left is a cube as i view it now. On the right is how it should (how i want it to) look. How can i make it that way?
Also, I read a bit about matrix modes and it seems as if GL_PROJECTION is supposed to be used with gluPerspective. When i use them together, however, the perspective effect goes away. Only in GL_MODELVIEW will gluPerspective work. I am puzzled as to why this is the case.
The following is the code i use to display the object.
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
gluPerspective(60,1,0,10)
zNear
must be greater than zero and less thanzFar
. Try something like0.1
.Try this sequence instead: