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 / Fullscreen

Author
Message
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 27th Apr 2008 01:43
I think I posted this elsewhere, but no one replied. How do I do fullscreen with Dark GDK?

I don't need an oven to make my cookies.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 27th Apr 2008 01:43
Cool, I'm not a 'newbie member' anymore!

I don't need an oven to make my cookies.
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 27th Apr 2008 01:57 Edited at: 27th Apr 2008 01:58
Just use the following command:



No matter how good your code is, someone will improve on it
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 27th Apr 2008 01:59
Ok?

I don't need an oven to make my cookies.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 27th Apr 2008 02:01
Thanks, it works.

I don't need an oven to make my cookies.
FERSIS
18
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 3rd Jul 2008 17:15
when i use dbSetDisplayMode(1024,768,32); my application starts as a little window (640x480) and THEN its resized to 1024x768.
This happens to everyone ?
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 3rd Jul 2008 17:18
Well, and easier way is to just do dbMaximizeWindow (); It makes it full screen, easyer then doing the other way.

Your signature has been erased by a mod - 3.5MB for an image is too much - try something under 150kb
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jul 2008 17:33
Maximize is WAY slower bUT solves the Lost "device" issue if someone is full screen and switches to a desktop app then tries to go back to your program and it chokes. Futhermore - on this topic, I've people say its the programmers responsibility to "rebuild the scene" and now that I have had some time in DirectX - this is a crock! I'll elaborate below.

First - the small window then resizing thing - yeah that happens because the lib is init'd internally I think to the 640x480 size, then your code executes. I've tried various methods to contend with - like centering the window among others and decided to just put the window at 0,0 and size accordingly OR go full screen.

- Back to Lost Device -
If DarkGDK is managing the textures, meshes etc in memory for us already - there is NO REASON WHATSOEVER it can't be built into DarkGDK. In DirectX - you basically have 3 main dilly to contend with concerning "lost device". Let me point out that each "loop" you test to see if you lost the device. If So - there is some cleanup - and then reloading/recreating stuff. I can't see why this isn't part of DarkGDK though.

For an object, you might want to cover your bases like this: One function loads your object (its like an init function but often referred to as a "restore" function - because you can have some init stuff that doesn't need to be run for each "restore" of the previously non-existant or broken device).

1: Restore
2: Render
3: Destroy

If your device is broke in dx, you destroy first - then call your restore function to get it back.

Now for bitmaps and textures I guess this could be problematic for images not loaded from disk (if from disk, DarkGDK could just remember what the file name was and reload as necessary) but even this should be able to be overcome because in dx there are three main ways to store gfx info - vram, vram(managed by dx), and system ram - where you need to thunk the data yourself to vram.

Now - I might have my nomenclature off a bit in this post - but generally speaking... in dx9 - the mechanism one would write to restore a lost device (going fullscreen to desktop breaks it usually, and going back to full screen is the restore I mean) happens pretty dang fast. I have in this demo I made here: ftp://jegas.com/setupkatana0010.exe

The ability to go fullscreen to windowed via ALT+ENTER and back and its just about instantanious. Why? Because the mesh data is in system ram - then I just tell DX9 during the restore: "See this Data? Its a mesh for you!" then it does what it does to prep it - and then in the render I say "Remember that mesh named whatever? Render it like this...." and it does it.

So - I'm done - sorry to rant - thought this info would be interesting to some.

In fact, I'd bet that the next "release" of DarkGDK (if there is one...I hope so) does this for us automatically.

--Jason

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 3rd Jul 2008 17:37
What he said.

Uh, what did he say?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jul 2008 17:49
In short - (LOL) - In DarkGDK - if you're in windowed mode - switching to other tasks doesn't mess up your game. In full screen it can and does trash your game.

Many have complained of this and sometimes someone comes on all self righteous saying its the programmers responsibility.

I've been using directX enough to know that it wouldn't be all THAT hard to just build it into DarkGDK. Afterall - it is a lib to help make writing games easier - and the code involved that would have to be written to do the device restore yourself in DarkGDK is not only complex - but silly - because all the information you have to keep updated EVERY LOOP to do it right - is already in the DarkGDK - and just adds overhead and unnecessary complexity for the casual hobby programmer who wants to make a game in DarkGDK.

--Hows that for clarification? LOL I hope this turns my rant into something more readable--

--Jason

Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 3rd Jul 2008 19:20
I do hope they update the GDK. I love it, and really think it has some room for improvement. Not any thing major, necessarily, but little stuff, like what you just pointed out.
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 4th Jul 2008 04:43
They ought to fix the broken commands, like...um, I don't know...BSP! It's been an advertised feature of DBPro since release, and it has never worked 100%. And with DarkGDK, I believe the commands are even worse than DBPro was. If only we could have compiled levels with internal collision and entity data! But I digress, minor bug fixes and the ability to set start up resolution is enough of a change for a new release, I believe.


My site, for various stuff that I make.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 4th Jul 2008 08:26
The commercial license should come with the source. Not just compiled .lib's.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 4th Jul 2008 08:31
Quote: "The commercial license should come with the source. Not just compiled .lib's."


I have to disagree with that. The source code could either be abused or find its way to others who could modify it and sell it as their own effort.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 4th Jul 2008 08:34
You're right.

Anyway, who dug this artifact up? FERSIS?

Login to post a reply

Server time is: 2024-09-30 01:25:10
Your offset time is: 2024-09-30 01:25:10