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 / Multiple viewports or control over the window

Author
Message
Ever
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Germany
Posted: 31st Jan 2007 08:43
Hello,
I just bought the DGDK.NET, and it seems that there is no way to control the main window or just set another canvas to draw on.
Maybe I didnt carefully read the manual or the manual is incomplete.
So can anybody tell me if it is possible to control what surface the engine should use to render?

Thanks
Ever
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Germany
Posted: 31st Jan 2007 09:21
Ok, found the solution. Now I have another question:
Is the DGDK thread safe? Can I manipulate the scene in multiple threads without messing up DGDKs internals?
Thanks,
Ever
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 31st Jan 2007 10:21
Ever,

Rendering to multiple viewports or windows was not a fundamental property of DGDK.NET since overiding window handles is done within the engine itself and I don't have total control over this procedure. There are (possible) workarounds if you use image bltting but this would require your own window image rendering function.

As for multiple threading situations, I don't believe that the actual DGDK engine itself is thread safe. I can't give you specifics on the engine core because this is a TGC matter, but you may find this following thread of interest. Since DGDK.NET and DarkBASIC Professional are derived from the same engine code, the thread may detail what IS possible, but I can't vouch for the stability of the engine if you tried it.

http://forum.thegamecreators.com/?m=forum_view&t=98084&b=8

Paul.


"This is Big Brother, could Ian please remove his head from the oven, thank you!"
Ever
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Germany
Posted: 31st Jan 2007 14:12
Thanks ApexNOW. I have few more questions about Direct Input and Module instancing.
When I override the HWND it seems that Direct Input isnt updated to capture events from the new window. Is there a way to reattach it to the new window?
The other question is, if it is not possible to update direct input, I could write my own input handler, but I think that functions like object picking and similar dont work too, right?
And now about modules. What happens if I instance the dbApp object? Does the whole engine load or only the parts of which I instanced an object. Lets say I make a "new odb3D" in the globals but not an odb2D, is the 2D module then instanced?
thanks,
Ever
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 31st Jan 2007 14:43
You sort of lost me a bit there, but I will say that it doesn't matter how many instance of the objects you create, i.e. if you created two oDB2D or w/e, they will always instance the same process. I.e. oDB3D.MakeObjectCube, will be known to other oDB3D instances.

Paul.


"This is Big Brother, could Ian please remove his head from the oven, thank you!"
Ever
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Germany
Posted: 31st Jan 2007 15:21
Ok sorry, I did not explain it well, my english is not so good.
What I meant was, when I initialize the DGDK, is the whole engine being loaded, or just the parts (ie. odb3D, odbSystem,..) that I instanced with the new operator in the globals module. Example:



As you can see I commented out two lines in the module. What happens here, are the terrain and world modules loaded or not?
Does the engine load the modules behind the wrapper though I didnt Instance the two objects?
I put this text into a translator and what came out was garbage, so I hope you understand me.
Thanks,
Ever
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 31st Jan 2007 15:27
Oh I See. Commenting out those lines will not make any difference to the modules that are loaded, as this is done in the DGDK.DLL component. Those entries in the dgdkGlobals file just setup links to the interface for calling the functions.

Paul.


"This is Big Brother, could Ian please remove his head from the oven, thank you!"
Ever
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Germany
Posted: 31st Jan 2007 15:38
Ok, that what I thought.
But what about the Direct Input?
And by the way, do you use some kind of messenger, so we could avoid using this slow communication channel?
Thanks,
Ever
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 31st Jan 2007 16:07
With regards to input, a similiar question was asked here:

http://forum.thegamecreators.com/?m=forum_view&t=97589&b=22

I posted a response and the reason why this happens, and I'm working on a possible solution, but it won't be available just yet.

As for quicker responses, I check the forum regularly, which also allows other people to potentially offer assistance as well, but there is an IRC channel I host. See the sticky thread at the top of this forum regarding the IRC channel details.

Paul.


"This is Big Brother, could Ian please remove his head from the oven, thank you!"

Login to post a reply

Server time is: 2024-11-19 11:28:49
Your offset time is: 2024-11-19 11:28:49