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 / [DarkGDK 2.0] fullscreen mode?

Author
Message
haliop
User Banned
Posted: 23rd Jul 2012 08:17
i think it is unavaible but is there a way around it?!
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Jul 2012 11:43 Edited at: 23rd Jul 2012 11:43
There's a section in the docs: DarkGDK > How to > Basics for C++ > Fundamentals > How to change the resolution

GDK doesn't support fullscreen exclusive (which changes desktop resolution) instead it works similarly how "fulldesktop" mode works in DBPro.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
haliop
User Banned
Posted: 23rd Jul 2012 16:22
so no full screen ?
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Jul 2012 17:02

This gives you full screen. Well, full-screen windowed with no border of any kind.

The fastest code is the code never written.
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 23rd Jul 2012 17:21
while (dbInKey() == "");

What to put in there to detect the ESC key hit ?

Is there any table available for all the key strings in Dark GDK 2.0 ?
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Jul 2012 18:20 Edited at: 23rd Jul 2012 18:22
Quote: "so no full screen ? "


I'll repeat my self. You can't have "fullexclusive" instead you use the "fulldesktop". It is a full screen mode where a window without borders is used to cover the whole screen and render the game. Most modern application use this method. If you remember, back in the days there where games that crashed and left you with low resolution desktop and reorganised icons. This wont happen with GDK 2.0 applications even if they crash, since they never change desktop resolution.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 23rd Jul 2012 18:37
How do I implement - capture hitting of ESC key so he/she can get out of full screen mode or stop the application ?
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Jul 2012 18:51
Quote: "int dbEscapeKey ( )"


or

Quote: "int dbKeyState ( int virtualKey )"


with

VK_ESCAPE


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 23rd Jul 2012 20:53
do {


}
while (dbEscapeKey() != true );

It is not working - when I hit the ESC key.
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Jul 2012 21:18 Edited at: 23rd Jul 2012 21:19
Works here with PB:




Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 23rd Jul 2012 21:57
do{


}
while (!dbKeyState(VK_ESCAPE));

not working also ! Or am I doing something wrong here ?
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Jul 2012 21:57
Here's an example game loop:

This works by telling windows to close the program.

The fastest code is the code never written.
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 23rd Jul 2012 22:01 Edited at: 23rd Jul 2012 22:07
@Hawkblood: Yes your code works but only when the window is closed using mouse by clicking on the red close button on the far top side of the window. In full screen mode there will be frameless window and the user will have to close the game window by hitting a special key on the keyboard - for example the ESC key.


THANK YOU HAWKWOOD - your code works perfectly. I have a hunch why my previous posted code is not working - it is because when the user hits the ESC key only the game loop is stopping but no signal is getting sent to the Windows OS that the user wants to close the outer window within which the DirectX window is getting displayed. Hope I am correct in the reasoning. Or somebody please correct me if I am wrong.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Jul 2012 23:03
After the code I showed you, all the releasing of memory you allocated (anything outside of DGDK) should be done. After that, a simple return 0; will get you free of all parts of the app. This return is for the "main" function of the program and is the proper way to finish execution of a windows application.

The fastest code is the code never written.
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 24th Jul 2012 16:20
@Hawkblood: Yes , thank you again for telling me the proper coding steps needed to close down my application. I will adhere to it.

Login to post a reply

Server time is: 2024-03-29 06:26:59
Your offset time is: 2024-03-29 06:26:59