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 .NET / Dynamically Changing Window Size

Author
Message
gwin003
11
Years of Service
User Offline
Joined: 22nd Jun 2012
Location:
Posted: 23rd Jun 2012 04:24
I want to be able to change the window size dynamically. Basically I want the user to have the option of changing the resolutions.

The first issue I was having was the newly re-sized window would be black, not showing any sprites, even though I was reloading the correct new images.

The bigger issue is an AccessViolationException that occurs on DarkGDK.Core.Sync() after the window changes size. Here is the code I am using the change the window size...



Does anyone know how I can dynamically change the window size?
gwin003
11
Years of Service
User Offline
Joined: 22nd Jun 2012
Location:
Posted: 26th Jun 2012 05:03
Solved my own problem....

You need to include...



..in addition to SetDisplayMode(). Remember to reload your assets to load the correct images based on your new resolution.

So the whole function would be...

Login to post a reply

Server time is: 2024-04-23 21:20:03
Your offset time is: 2024-04-23 21:20:03