Jump to content
  • Advertisement
Sign in to follow this  
omgzor

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

This topic is 2911 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
I also don't get why it doesn't draw the cube still and why did it draw the Foot without the glMatrixMode call.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!