0

I don't really know what to ask here because the only indication I have that there is something wrong in my program is that nothing is showing on the screen.

I'm loading a .obj model (it's just a cube, and i've checked all the verts/faces and they're all proper values) and I create a display list out of it, with just regular glVertex3f calls.

The problem is that when I try to render it, it doesn't show up on the screen. Before I render it, I glPushMatrix and glTranslatef to (0,0,-5), so that I could see the actual object, but it doesn't show up.

I've simplified the drawing code so I can show it here but basically it goes like this:

glClear (GL_COLOR_BUFFER_BIT
GL_DEPTH_BUFFER_BIT);
glMatrixMode (GL_MODELVIEW);
glPushMatrix ();
glLoadIdentity ();
glTranslatef (0, 0, -5);
glCallList (cube); // this is a valid display list
glPopMatrix ();
SwapBuffers (r_context);

If there is any more information you need, just ask

PS. I have tested drawing other things (points, etc..) to test that I can actually
draw to the screen, and that works.

Edited by tomtetlaw: n/a

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by tomtetlaw
0

I don't know exactly what you mean, but I think this code would have something to do with it (it gets called when the window is created/resized):

glMatrixMode (GL_PROJECTION);
glLoadIdentity ();

glFrustum (-1, 1, -1, 1, 0.1f, 100.0f);

glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();

Edited by tomtetlaw: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.