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 / [DarkGDK2] Changing from windowed to fullscreen (and back)

Author
Message
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 7th Dec 2012 13:00
In DarkGDK1.0 it is simple: one function. But in DarkGDK2 there doesn't seem to be an immediate way to switch to full screen. Or am I missing it?

I guess I have to make my own fullscreen HWND object and use that? If so I have no idea how to make a truly full screen window.

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Dec 2012 15:13


The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 7th Dec 2012 15:28
Oh ok. Thank you!

How would I go about doing this mid-application? I'm assuming I need to dbCloseScreen() and then re-run the code above but as a window? I'm also assuming this will delete my loaded data, just like DarkGDK1 and Darkbasic?

I'm not home quite yet :\

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Dec 2012 16:03
Now I'm not sure what you are trying to do..... Do you want a full screen mode or do you want to minimize your screen or do you simply want to switch between programs while it's still running????

GDK2.0 uses "full screen windowed", so you can loose focus on your application, but it will never loose its graphics property. If that makes sense....

The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 7th Dec 2012 16:19 Edited at: 7th Dec 2012 16:20
What I'm trying to do is make it so that when the player is in the login screen of my game, it is in a windowed state, but then after the user logs in, it switches to fullscreen. I'm thinking of just making the whole thing fullscreen since this sounds like a silly thing to strive for. Maybe I've just been playing too much League of Legends. Haha

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Dec 2012 20:16
Oh. I understand now. I did that once. So you don't actually need to have your resources loaded (meshes/images) for the rest of the game. You just need to open a window, take care of whatever menu you have, and close it to run the game..... right?

While you're inside WinMain() you should be able to open and close windows as you like. openWindow() is paired with PostMessage(hWnd,WM_CLOSE,0,0) and dbOpenScreen() is paired with dbCloseScreen(). Until you return 0; from WinMain() you should be able to open/close all day long....
Here's an example:


The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 8th Dec 2012 12:53
That's very nice to know I can do that! Does this delete all saved data into the video buffer? Kinda like if I switch video modes in DBpro?

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Dec 2012 17:04
I think so. But if you are just making a login screen, you don't need to load any of the game media. Do that after the player logs in. What I do with most of my games is I have an initial launch screen that has options for resolution changes before going into full screen. This way I only have to change it once and I can load all my static meshes and images. Once in the game, the player can go to "main menu" screen (which is in full screen) and do whatever.

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-03-29 12:39:10
Your offset time is: 2024-03-29 12:39:10