Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've been adapting a tutorial 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.

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.

edit: codepad link to Main.cpp

share|improve this question
2  
I really doubt many people are going to download the code. Use code tags and place it in your question, or use codepad/pastebin on the forever-stay-up-there setting? –  The Communist Duck Dec 22 '10 at 19:16
    
Yeah, I thought the same thing. The code is long though, and it's split across several .cpp files. I'll try to post the most relevant parts. –  omgzor Dec 22 '10 at 19:37
    
Well, some helpful guy on gamedev.net did download the thing. Dude, this isn't a virus. I don't wanna get booted out StackExchange. gamedev.net/community/forums/topic.asp?topic_id=591112 –  omgzor Dec 22 '10 at 19:43
2  
Asking for a step that's beyond just reading what's in the question or providing a link to something in a web browser (consider pastebin or something similar) is going to reduce the amount of responses you get. People are lazy. –  Tetrad Dec 22 '10 at 20:08
    
I wasn't saying it was a virus, I was simply saying that people are mostly not going to bother helping someone if it means they have to do a lot of work. –  The Communist Duck Dec 22 '10 at 20:41

1 Answer 1

I'd start by looking at the file you are trying to load. My experience with different exporters of .obj files is that they can play a little loose with the formats structure/order. Make sure the data looks the same between the two.

If you are loading the non-foot files, but just failing to render then another thing to check is if the foot model is entirely triangulated, and if the other models you are loading have faces defined by more than 3 verts.

share|improve this answer
    
+1 first thought here, what kind of obj files are we talking about? There are many that use that ubiquitous extension and the "format" I'm thinking of has very loose specs where things like line-breaks can differ and mess things up... –  Oskar Duveborn Dec 27 '10 at 11:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.