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 2 of 2

Thread: display list

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2005
    Location
    dublin
    Posts
    23

    display list

    Hi all,

    looking for a bit of device. I have imported a model into opengl and it displays absolutely fine to the screen when Im not using any other display lists.

    However when I add another display list to the matrix ie

    glLoadIdentity();
    glPushMatrix();
    glCallList(Room);
    glPopMatrix();
    glPushMatrix();
    glCallList(Model);
    glPopMatrix();
    I can no longer see the model however I can see the room.

    Could this be that the model is infront of the room or behind the room or could it be for some strange reason that the model is just 2 big to be seen on the screen hence im only seeing the room.

    Anybody got any idea's?

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,527

    Re: display list

    Perspective mode?
    glMatrixMode(GL_MODELVIEW) active when entering the function?
    You normally don't start with a glLoadIdentity then, but need to have moved the world away from the viewer with some glTranslatef(0.0f, 0.0f, -(zFar - zNear) * 0.5f) like thing.
    If your display lists contain glMatrixMode calls make sure you're on the same matrix stack when entering and exiting the calllist or your glPush-glPopMatrix are unbalanced.
    Check glGetError if there are matrix over or underflows.
    The projection matrix stack is smaller than you might think.

    Other reasons include depth buffering.
    Do you see into the room or is the "model" inside it and you're looking onto a wall?
    Disable depth testing to see if the last thing renders something at all.

    General tip: Not using black for the glClearColor color sometimes helps to debug if you're rendering black on black.

Posting Permissions

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