Why is this .obj loader not drawing anything but the included .obj?

Started by
2 comments, last by omgzor 13 years, 4 months ago
I've been adapting a file from gametutorials on .obj file loading on the windows system to glut.

The thing's not drawing a thing except the "Foot.obj" file that the tutorial included and I'm going kinda nuts trying to figure out where's the fault. I'd appreciate a look into the code: http://www.filedropper.com/ripobj_2

To try loading a different .obj just change the line

#define FILE_NAME_1 "Foot.obj"

in `Main.cpp`. I included the .obj files I've been trying to load into the VS project.

codepad link to Main.cpp: http://codepad.org/uXKt9de1

[Edited by - omgzor on December 22, 2010 2:30:05 PM]
Advertisement
You're missing "glMatrixMode (GL_PROJECTION); glLoadidentity ();" before your gluPerspective call.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Quote:Original post by mhagain
You're missing "glMatrixMode (GL_PROJECTION); glLoadidentity ();" before your gluPerspective call.



Thanks, but why isn't it drawing the cube still?
I also don't get why it doesn't draw the cube still and why did it draw the Foot without the glMatrixMode call.

This topic is closed to new replies.

Advertisement