SoftPixel Forum

Official community of the SoftPixel Engine and the SoftPixel Sandbox (REGISTRATION only with consultation with the Admin)
It is currently Thu Oct 19, 2017 10:56 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: updateDeviceSettings
PostPosted: Sat Oct 06, 2012 9:54 am 
Offline

Joined: Mon Jul 16, 2012 8:34 am
Posts: 29
Location: Germany
I am trying to add a config menu to my Minesweeper. There I want to change the resolution and switch to fullscreen mode.
To update my device I use the method "updateDeviceSettings". The resolution changes, but afterward the screen stays black. Only grey rectangles appear where my buttons are, without the text. In the SPE reference I found this entry:

Quote:
Updates the device settings. This recreated the main window, device- and render context. If any settings has changed all resources will automatically updated. If you want to change the render system you need to delete the device, create a new one and load all resources again. This feature is only supported on desktop platforms like Windows and Linux.


In my understanding this method recreates the RenderSystem and the RenderContext. I updated both, but with no effect. Do I have to recreate my whole scene after this?

I am still using SPE 3.1 and OpenGL. In the SVN for SPE 3.2 I found a change for this method, was there a bug fix? Anyway I prefer to wait for 3.2 until it is finished.


Top
 Profile  
 
 Post subject: Re: updateDeviceSettings
PostPosted: Sat Oct 06, 2012 11:00 am 
Offline
Site Admin
User avatar

Joined: Sat Jul 07, 2012 5:58 pm
Posts: 540
Location: Germany
In SPE 3.1 this function does not work. In 3.2 I changed a lot and among others switching to fullscreen is very easy (but currently only works for OpenGL).
Here you can see how to switch to fullscreen mode dynamically in 3.2:
Code:
spContext->setFullscreen(true /* or false */);

In your case I advise you to make the device-settings changed after game-restart. A lots of games do it this way, because it's just easier to program.
Changing other device-settings (apart from fullscreen) results anyway in re-creating the whole render context (re-loading all textures, re-creating all mesh buffers etc.).
Therefore restarting the game to update those device settings is the best solution.

_________________
My latest project:
- The XièXiè Programming Language

My hardware:
- GIGABYTE GeForce GTX 670
- Intel Core i7 (Ivy-Bridge)
- 16 GB DDR3


Top
 Profile  
 
 Post subject: Re: updateDeviceSettings
PostPosted: Sat Oct 06, 2012 11:04 am 
Offline

Joined: Mon Jul 16, 2012 8:34 am
Posts: 29
Location: Germany
Ok then I will restart it every time.


Top
 Profile  
 
 Post subject: Re: updateDeviceSettings
PostPosted: Mon Oct 13, 2014 6:33 am 
Offline

Joined: Mon Oct 13, 2014 6:26 am
Posts: 1
Updates the device settings. This recreated the main window, device- and render context. If any settings has changed all resources will automatically updated. If you want to change the render system you need to delete the device, create a new one and load all resources again. This feature is only supported on desktop platforms like Windows and Linux.

_________________
http://saintlukescollege.edu
http://www.testking.co.uk/exam/70-247.html
http://www.emc.com/index.htm
http://www.princeton.edu/main
http://en.wikipedia.org/wiki/University_of_Alabama


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group