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 objects simultaneously in multi-threaded environments

Author
Message
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 26th Jun 2012 20:31 Edited at: 26th Jun 2012 20:33
Hey, I'm working on a project where streamed loading of the game environment would be almost a must for it to run properly. I am using the boost.thread library for the threading and found out that attempting to load several objects at the same time will give you an error. This is a setback because it will push my project back a lot. Would there be a way to work around this or get access to the source code to have a look or will I have to find another way around this?

[EDIT]
Just saw the 2.0 announcement.

Quote: "Internal multithreading support. Go thread crazy!"


I'm pretty sure I use an older version, does this mean I can use threads safely with this version?
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th Jun 2012 20:34
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 26th Jun 2012 21:23 Edited at: 26th Jun 2012 21:24
Quote: ".. attempting to load several objects at the same time will give you an error."


Pass the following flag to dbOpenScreen when initializing the engine: kGDK_ThreadSafe.

The 'flags' parameter has been moved to initDarkGDK in RC5, just so you know.

Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 27th Jun 2012 00:48
Quote: "I'm pretty sure I use an older version, does this mean I can use threads safely with this version?"


Yes, GDK 2.0 is thread safe. Do as Mistrel suggested in previous post.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 28th Jun 2012 01:22
Thanks a lot guys, looks like I will be upgrading then!
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 28th Jun 2012 01:40
Quote: "Thanks a lot guys, looks like I will be upgrading then!"


Make sure you read the Fundamentals section of the documentation. It outlines major changes from GDK 1.0 to 2.0. Additionally many commands have been renamed and amended so be careful as you existing GDK code will not work straight away in GDK 2.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0

Login to post a reply

Server time is: 2024-11-19 00:49:38
Your offset time is: 2024-11-19 00:49:38