- Can I import a model I've developed elsewhere?
I'd prefer that you create your model using openGL directly, but will allow
use of GLU (and GLUT teapot) routines for creating 2D objects. You can also
seek special permission by showing me what you have in mind.
- When I enable depth buffering nothing gets drawn to the screne. Why?
There are many reasons this might happen:
- You must clear the depth buffer each time before you (re)display your scene.
- Your near clipping plane should be > 0. The view is projected onto the
near clipping plane; if you are sitting on it, you cannot see the projection.
- You need to be far away enough from the model to actually see it.
- When you are saying: "Use mouse button control to decide the speed and
"direction" of the animation." How should the speed be controlled?
This can be determined using the GlutMotionFunc. See the demo2.c code.
- I'm having trouble scaling and translating. Please help.
Well, this is hardly enough to go on! But, there are several things that
affect your image and must be considered:
- What is the location of your model with respect to the view volume? Is the
view volume cutting off part of what you want seen?
- Are your transformation factors small enough to keep the model within
the view volume?
- Are you trying to transform the whole model or just part of it? If just
part, then you'll need to use glPushMatrix and glPopMatrix to
cause the transformation to affect only that piece of your image.
- The modelview matrix should be set up with the view first and then
any model transformations so that the model transformations take place first.
- The view that you have set up may affect what is finally seen.