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 / Problems loading objects.

Author
Message
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 4th Nov 2006 08:32
Hello.
Ive been using DBP for quite some time now, and i just bought the DGDK.NET, and Im having trouble loading objects.
When I load them and compile, the models wont show up.
I dont know if im missing a step or something, so Im posting the code in hope that you guys could help me.
Thanks.
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 4th Nov 2006 08:58
Dextro, it may be possible that the executable is not finding them. If your using vb.NET or csharp.NET, building the executables will place your binary into your ./bin folder, and even possibly into a /debug or /release folder. Unless your specifically providing an explicit path to your models, your application will try to find your models in the current folder. So this would be the location of your EXE when it runs.

You can either use the oDBFile.SetDir() command to set a working directory for locating your models, or you can specify the startup working directory under your project properties/debugging tab.

Now, I know that you may be wondering.. why didn't it error if it couldn't find the model when loading, well, this is hopefully going to be resolved on the next release of the DGDK.NET update, but for now, you may want to consider using the oDB3D.ObjectExist() function right after a load, just to see if the model was loaded successfully.

Paul.

jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 4th Nov 2006 12:03
Another thing if you don't want to rely on the current path being set to the current directory, to get the "Working directory" you can use:

System.Path.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)

This will return the directory where the executible is.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 4th Nov 2006 17:11 Edited at: 4th Nov 2006 19:10
That worked
Thanks.
Now im having trouble with PlayObject funtions, doesnt seem to do anything.
And how do I specify which frames to play?
Edit:
Lol found a workarround, just used SetObjectFrame.

Edit:
Got another question, why if I set sync rate to 0, the max fps I can get is 60? any known way to fix this?
Im running a high end machine, with an nvidia 7950 GX2 512 mb in SLI, 4 gigs of ram; so I dont think its my comps specs that are causing this.

Login to post a reply

Server time is: 2024-06-17 08:06:58
Your offset time is: 2024-06-17 08:06:58