Hello.
I am playing with pyopengl (and qt) and I have some problems. I am a
newcomer to opengl and pyopengl.
I am able to draw an object and rotato/zoom/move it.
My problem now is that I'd like to draw the object in 4 viewport (no problem
here) but with different point of view.
Basically I am trying to draw the 3 basic orthogonal view (XY, XZ, YZ) and a
perspective view.
I am not interested in a 2D view for the orthogonal projections, since I
will need the full 3D object anyway.
Now I get this simply rotating the object around the axis as I need, but I
am not sure this is the correct thing to do.
Looking around it seems that the correct solution is to move the camera to
have the correct point of view.
So what are the correct way ? Rotate the object or move the camera ?
And if the correct way is to move the camera, where I can find a simple
example ?
My idea is to make something like this:
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glViewport(0, 0, w, h)
gluLookAt(eyeX, eyeY, eyeZ,
centerX, centerY, centerZ,
upX, upY, upZ);
glMatrixMode(GL_MODELVIEW)
and then render my object
but I cannot understand if this is correct and where I must do it.
I suspect that I must do it in the display function, setting the values of
the parameters for gluLookAt in some other places (I am thinking about
the properties
of the viewport)
Is this the correct approach ? If not, where is my error ?
thanks in advance
Gianluca
