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 / Automatic assignments not working

Author
Message
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 12th Jul 2012 20:16 Edited at: 12th Jul 2012 21:22
EDIT: This is for GDK2.0

dbLoadEffect(),dbCreateCamer(),dbLoadImage().... There may be more. These are supposed to return the reference number of a free one. I get 22 as the initial reference number which, in some cases is invalid (like camera).



The fastest code is the code never written.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 12th Jul 2012 21:12
That sounds weird...
You can make your own functions for finding free indices by using a value that you increment each time you "use" a ID and a stack that you fill with deleted ID's. Only if the stack is empty do you increase the ID to get a new free one.


"Why do programmers get Halloween and Christmas mixed up?"
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 12th Jul 2012 21:15
Already done. This was a post to get TGC/Mistrel's attention. If they are going to have automatic assignments, they need to check their outputs. It took me several hours to figure out that dbCreateCamera() was returning 22 as the value.

The fastest code is the code never written.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 12th Jul 2012 22:01
If I recall correctly you may use cameras 0 through 31 though, are you sure number 22 is out of bounds?


"Why do programmers get Halloween and Christmas mixed up?"
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 12th Jul 2012 22:20
I thought there was only 8 cameras max to use.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 12th Jul 2012 22:26
It may not be out of bounds, but they have to be sequential for some reason. As I stated in another post, a value that is not in sequence will cause the rendered camera to show as if it's camera 0 and overlap occurs..... Don't know why. It's best if you look at it yourself.

The fastest code is the code never written.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 12th Jul 2012 23:31
Is that so... hmm, I might have to rewrite my camera wrapper class then
Thanks for pointing it out before I'd have to sit around and scratch my head for days trying to figure it out though, hehe

@Mr. Bigglesworth: I believe that's the lights.
If you look at the help text for sync mask (as I recall, but I did just a few days ago so hopefully my memory serves me right) it is suggested that you can have 32 cameras (including the static camera "0").


"Why do programmers get Halloween and Christmas mixed up?"
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 13th Jul 2012 14:26
I don't know of any camera limitations off-hand, although I haven't actually looked at the engine code to confirm. I seem to be able to create cameras up to 300 just fine:



I believe "sync mask" only works for literal IDs 0-31? Ideally this value should simply be toggleable on any camera ID and not through a limited mask. But this may also be a DirectX thing. Something to look into in the future as a feature.

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 13th Jul 2012 14:28
Mistrel!!! Yea! Your back! I hope you can address the plethora of issues I've posted....

The fastest code is the code never written.
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 13th Jul 2012 14:36
If you have a few of them, please send the links in an e-mail to support@darkgdk.com to be sure I don't miss any of them.

Login to post a reply

Server time is: 2024-04-20 12:28:48
Your offset time is: 2024-04-20 12:28:48