Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Loading 3d Objects Program Stops Responding

Author
Message
Dan Woolley
16
Years of Service
User Offline
Joined: 5th Dec 2007
Location: England
Posted: 6th Dec 2007 21:10
Hi,

I've just installed the GDK and worked through the first tutorial which worked great! Then I moved onto the second tutorial, loading 3d objects.
When I run the program it displays a black screen and the model doesn't load. On trying to close the program I found it is frozen and has stopped responding. I have to force it to close from task mngr. I have tried using a different 3d object to load but still no luck.

I have created a new 3d project from the wizard and that runs fine. I have also compiled and run the Dark Invaders tutorial and that plays fine also.

I'm running Vista HP

Any ideas?
Thanks
Dan

Dan
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 7th Dec 2007 08:52
Is it freezing on primitives like cubes and spheres or are you trying to load a model?


Tux is my guildmaster.
Pharoseer
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: Right behind you
Posted: 7th Dec 2007 09:32
Hey Dan,

I think what's happening is it can't find the model you're trying to load and it's freaking out. Did you copy the Colonel-X.x file into your project folder? If you're using the project that was supplied you shouldn't have a problem, but if you started from scratch (the way I did), you'll need to copy over any media you'll be using.

Hope this helps,
-Frank
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th Dec 2007 18:53
I use a few silly tricks to help with this kind of foobar.

1: Make a global/generic function - that you can always call with a text string - that gets written to a log file - (make sure you code it so you can turn it on and off at will with conditional defines - so that in a release - you can easily strip the code - and not slow your end project down

2: Use a fileexist call - for each and every file - if the file doesn't exist - send the filename to the log file function mentioned above - before letting your program bomb out.

3: Write some code get the working directory - and or use relative paths - that take into account the way Visual Studio puts the RELASE and DEBUG down a bit... C:\PROJECTNAME\Bin\Debug\Your.Exe or C:\PROJECTNAME\Bin\Release\Your.Exe

4: Use the registry for your absolute file paths and/or put a little text config file - with the root path of your project - into either: C:\PROJECTNAME\Bin\Debug\ or C:\PROJECTNAME\Bin\Release\

when your program opens - you SHOULD be able to open the file without a path or anything (unless you have a shortcut that specifies a specific "Starting Directory) - in short - you should be able to open and read in the PROJECT PATH from this little config file always. Also eliminates registry woes and hardcoding stuff to much

Just a few thoughts.

Dan Woolley
16
Years of Service
User Offline
Joined: 5th Dec 2007
Location: England
Posted: 7th Dec 2007 20:18
Hi guys,
Thanks for the responses. Its very kind of you all.
I just wanted to update you all on situation.
The long and short of it is that I've tried it today with no adjustments and it works fine. I've tried it with two differnt models and both work perfectly. I have made no changes to the code what so ever. In fact I am running the ready made sample. Yesterday I had tried the sample and created my own from scratch with no joy from either. But today fine.
As a test today I deliberately changed the file name in the code to try and load something that didn't exist and sure enough I got the same result as yesterday, black screen with no response from the program. So it does appear to be that which was the issue but for what reason I have no idea. I'm going to have to put it down to just one of those many issues that only a pc restart will cure. I'm actually very annoyed with myself that I didn't do that yesterday and I appologise for not tring that before asking for help. Sometimes though you bypass the simplest things when your puzzled with a problem.

Thanks for all your input. Maybe this will help others in the future. If you get this result running your program check your models are in he project folder. If your sure they are in the right place, restart your pc!

Thanks
Dan

Dan

Login to post a reply

Server time is: 2024-09-29 05:31:29
Your offset time is: 2024-09-29 05:31:29