Switching to full screen mode
-
markanderson
- Posts: 30
- Joined: Thu Mar 16, 2006 6:21 pm
Switching to full screen mode
Hello All -
I've setup a window using createDevice() and populated the area with nodes. But I'd like to offer users the ability to switch to full screen mode.
I know the initial createDevice() call can be set to go full screen, but if I've started with a standard window - can anyone tell me how to switch between window and full screen?
Thanks,
Mark.
I've setup a window using createDevice() and populated the area with nodes. But I'd like to offer users the ability to switch to full screen mode.
I know the initial createDevice() call can be set to go full screen, but if I've started with a standard window - can anyone tell me how to switch between window and full screen?
Thanks,
Mark.
idear
Have you think about to create two devices and switch them with a botton, or you set variables for the windowsize and change them by a event.
only brainstorming, i don`t know how to do it in code.
only brainstorming, i don`t know how to do it in code.
Wer andern eine Bratwurst brät, der hat ein Bratwurstbratgerät!
Hi all,
again a question noone seems to have found an answer for: is it possible to change the device from windowed to fullscreen and vice versa?
This would really helpful, as the NVidia stereo drivers only work in full-screen mode, but I don't want my project to be full screen all the time.
The only way I now can think of is to close the device and open a new one, but that means all other stuff has to be reinitialized and all models reloaded, which is really a nightmare. Isn't there a simpler way to do this?
again a question noone seems to have found an answer for: is it possible to change the device from windowed to fullscreen and vice versa?
This would really helpful, as the NVidia stereo drivers only work in full-screen mode, but I don't want my project to be full screen all the time.
The only way I now can think of is to close the device and open a new one, but that means all other stuff has to be reinitialized and all models reloaded, which is really a nightmare. Isn't there a simpler way to do this?
A lot of DirectX examples can be switched from window to full screen, so it should be possible. I wonder if there is a quick hack, for instance similar to resizing the window with Driver->OnResize();bitplane wrote:no, unfortunately you need to restart the device, probably for the same reasons why you have to restart most commercial games after changing the screen size
-
Athlon_Jedi
- Posts: 156
- Joined: Wed Jul 21, 2004 4:29 am
- Location: Mishawaka, In
maybe with a state manager?
i havent tried it but if you implement a game state manager ( not the same as a game manager) you may be able to keep track of the state of the "window" and use an event reciever or function set up in a switch statement to accomplish it. dont quote me on that though as i havent tried it myself yet.
hmm maybe it would be possible then. i think you need to destroy the window and recreate it though, and deal with working around this in irrDeviceWin32.
then we'd need similar code for irrDeviceLinux and irrDeviceMacOSX, so this is unlikely to change for the moment. if you can provide a fix for the windows device and post the code, and someone else can fix it for linux and osx, then it would almost certainly be added to the engine
then we'd need similar code for irrDeviceLinux and irrDeviceMacOSX, so this is unlikely to change for the moment. if you can provide a fix for the windows device and post the code, and someone else can fix it for linux and osx, then it would almost certainly be added to the engine
how does the irrlicht demo works then? i rememberd that it also changes its device,
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
What if we build it like a sort of closewindow() when its called is removes the window and sets himself as waiting, so when you want to close only the window it sets himself with closewindow instead of closedevice()?
i think this is the idea but wrong code used 
Code: Select all
//! notifies the device that it should close itself
void CIrrDeviceWin32::closeDevice()
{
this->waiting_for_new_window = false;
DestroyWindow(HWnd); //PostQuitMessage(0);
}Code: Select all
//! notifies the window that it should close itself and still stays running
void CIrrDeviceWin32::closeWindow()
{
//set waiting on next
this->waiting_for_new_window = true;
DestroyWindow(HWnd); //PostQuitMessage(0);
}Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99