Hi
I was a bit frustrated by the fact that irrlicht can't change resolution in fullscreen mode without having to reload all irrlicht objects and resources. This includes textures and stuff which on a complex project would mean a long wait to reload. There must be a better way I thought.
So,
1) is it possible to cheat (in fullscreen mode), by
rendering at a lower resolution than the desktop resolution
then scale up to fit the entire screen.
e.g. I might have a 1680x1050 desktop res, but I want to play my
game in 1024x768.
(I suppose RTTs would work, but I'm not sure how widely supported
they are nowadays, so I'm hesitant to use them for the job)
2) for that matter, how can I resize the window in windowed mode?
Is there something like resizeWindow( dimension2di(1024, 768) );
I can't seem to find it if there is.
Thanks.
Changing resolution in fullscreen - a possible cheat
For 2) I guess you could try using the system-specific functions (for example Windows API). We do not have a platform independent wrapper for that so far.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
could those system-specific functions also work in fullscreen mode?
There must be some way that modern games can do this so effortlessly.
I guess I could always make a setup program as a seperate executable for configuring game settings that can't be configured in run-time. Feels somewhat dodgy to do so, but the alternatives are a pain.
There must be some way that modern games can do this so effortlessly.
I guess I could always make a setup program as a seperate executable for configuring game settings that can't be configured in run-time. Feels somewhat dodgy to do so, but the alternatives are a pain.
most games do this in some kind of options page, which has very few objects to re-load. I don't know whether they work by re-creating the scene or not, but it's certainly possible to mimic this behaviour by deleting & re-making the device. For simple scenes the delay will be minimal.
RTTs are well supported, so that solution will work (but is not ideal)
RTTs are well supported, so that solution will work (but is not ideal)
ArmA 2 can be configured like option #1. It has separate values for the window resolution and the render resolution. It then scales the render resolution up or down to match the game's window resolution.
But really, the feature you want is only in DirectX 10 and up. DirectX 9 games have always either reloaded everything when you changed certain settings, or required you to restart the game before they take affect. There is not much you can do about it.
But really, the feature you want is only in DirectX 10 and up. DirectX 9 games have always either reloaded everything when you changed certain settings, or required you to restart the game before they take affect. There is not much you can do about it.
Hmm... the RTT method does seem like a cheat.DavidJE13 wrote:most games do this in some kind of options page, which has very few objects to re-load. I don't know whether they work by re-creating the scene or not, but it's certainly possible to mimic this behaviour by deleting & re-making the device. For simple scenes the delay will be minimal.
RTTs are well supported, so that solution will work (but is not ideal)
Well, a game/program will always have the need to support saving/loading, so maybe I could use serialization to do that...
I could save the entire game, destroy the menu and game objects, delete the device, recreate it, recreate the objects, then reload the game. That must be how the professionals do it. Such a complex way to do something that should be simple. Oh well.. you get that.
Thanks for the advice.
-
hybrid
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Windowed mode and fullscreen can be fundamentally different. E.g. the usage of vsync may only work in fullscreen mode. So you cannot simply change the resolution to get fullscreen mode. This would only be a fake, which might also run slower than real fullscreen mode.
A window resize method should be possible in the future, though. We just have to be sure that the change propagation works correctly on all systems.
A window resize method should be possible in the future, though. We just have to be sure that the change propagation works correctly on all systems.