Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: wire appears to move from side to side on object

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Bethlehem PA USA
    Posts
    5

    wire appears to move from side to side on object

    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

  2. #2
    Member Regular Contributor
    Join Date
    Nov 2000
    Posts
    370

    Re: wire appears to move from side to side on object

    Just how is the model made? Are you use push/pop to add parts, or is it just a bunch of glvertex calls?

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Bethlehem PA USA
    Posts
    5

    Re: wire appears to move from side to side on object

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •