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.

Could you show the projection matrix that you have setup?

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 ();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.