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.

2D All the way! / Change display mid-program

Author
Message
Em3rgency
12
Years of Service
User Offline
Joined: 10th Jun 2011
Location:
Posted: 19th Jun 2011 12:30
As the title says. I can't seem to get the programs resolution to change while its running. I have a menu set up, and there are options for different resolutions.

Example, whenever I try to call dbSetDisplayMode(800, 600, 32) the program changes the window size, and crashes.

If I add a dbSetWindowOff() at the start of the program, the resolution changes and it does not crash, however the screen turns blue, and I can't really see any sprites that SHOULD be there.

Is there something I'm missing? Is there another PROPER way to do this?
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Jun 2011 23:37
Every time you change the resolution all loaded images are erased so they need to be reloaded.

Em3rgency
12
Years of Service
User Offline
Joined: 10th Jun 2011
Location:
Posted: 20th Jun 2011 19:49
Thank you for the response.

Is this also true for 3d objects? And is it possible to change resolution while the program is running in a window? As I mentioned, it only works while in full screen, at the moment.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 23rd Jun 2011 11:39
3D objects remain as they are, but the textures are also erased My advice is to set the resoltion at the start, and don't change it

TheComet

Em3rgency
12
Years of Service
User Offline
Joined: 10th Jun 2011
Location:
Posted: 24th Jun 2011 23:28
Well that's the idea actually Though I wonder why this causes so much problems? Its generally true for all games that you can easily change their resolution mid-game. Is this a Dark GDK specific quirk? Do anyone have any suggestions how this might be done, perhaps bypassing Dark GDK?

Login to post a reply

Server time is: 2024-02-29 08:06:05
Your offset time is: 2024-02-29 08:06:05