PDA

View Full Version : wire appears to move from side to side on object



JoeFinn
01-18-2001, 06:00 PM
Hello,

I have a wire grid model of a car with an
antenna on the drivers side. I am using
glOrtho to display it. When I spin the car
the antenna appears to move back and forth
from the drivers side to the passenger side.

Is there any way to fix this? I tried to
use perspective but then the model didn't
look very good.

Thanks in advance,

Joe
joefinn@rcn.com

Elixer
01-18-2001, 08:57 PM
Just how is the model made? Are you use push/pop to add parts, or is it just a bunch of glvertex calls?

JoeFinn
01-18-2001, 09:18 PM
The model is created in a loop using
glVertex. Here is the code:

glPushMatrix();
glRotatef(xRotation, 1.0f, 0.0f, 0.0f);
glRotatef(yRotation, 0.0f, 1.0f, 0.0f);
DisplayModel.DisplayWireModel(GL_RENDER);
glPopMatrix();
SwapBuffers(Display->GetGLContext());

DisplayModel.DisplayWireModel is just
a member function which loops through an
array using glVertex to build the model.

Thanks,

Joe