scanf/fscanf problem with an OBJ reader
Ok, none of OSC's code is useable to me, as I'm using C. it says my current working directory is Resources, so I move cube.obj to there. When I run my app it doesn't display the error message I preprogrammed, but It still loads into gdb.
~ Bring a Pen ~
mikey Wrote:When I run my app it doesn't display the error message I preprogrammed, but It still loads into gdb.
By "loads into gdb", I assume you mean you're running it with a debugger attached and it breaks on that line of code. So...debug it. We can't help you much when all you've said is essentially "here's my code, it's broken, I think it might have something to do with this line here". If you have specific questions about how to use your debugging tools, or you track down the error to a certain point and can't figure out beyond that why it's happening, then we might be able to help (if you actually post enough detail for us to know what you've done and what you need answered to get further), but you'll need to put in the initial effort yourself.
mikey Wrote:erm, because it means my code is faulty (and gdb is quite hard to understand).
It's actually a good thing that your program is able to load in to GDB, as that's what you use to debug programs. If GDB dies loading your program, then you've got a really big problem XD
As unknown pointed out, just because
Code:
fopen("cube.obj" , "r") == NULLis false, doesn't mean that
Code:
objfile==NULL
Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Ahah! It works! Now I've fixed the OBJ loading, but the error is when I drawArrays. I'll figure out that one on my own.
Thanks very much to everyone who helped solve my problem

Thanks very much to everyone who helped solve my problem


~ Bring a Pen ~

erm, because it means my code is faulty (and gdb is quite hard to understand).