Hi!
How can I change the screen resolution, fullscreen/windowed mode and other stuff set calling createDevice, during the game??
Changing resolution
-
- Posts: 50
- Joined: Tue Mar 09, 2004 9:53 pm
- Location: Spain
Changing resolution
There are only 10 types of people: those who understand binary and those who don't
--------------------------------------------
--------------------------------------------
-
- Posts: 16
- Joined: Mon Jan 12, 2004 4:31 am
- Location: USA
- Contact:
Not too sure if you can change the values of the device as it is running... I'm assuming you are wanting to do this for menus and stuff, correct me if I am wrong. I believe it would probably be easier and more efficient to just clear the device out and create a new one with the different values. You should be able to store any other data in memory while you change devices, much like the Irrlicht techdemo does. Again, I'm not sure if this would work. I've been up for a couple of days straight and I'm hard wired on caffeine. Your mileage may vary.
you can't change these settings for a running device. The best way is to make sure all the needed data is saved, release the device and then create a new one with the new setting. May games acutally work this way which is why they often pause when you change a resolution setting. Another option is to not have these options within your game, but have a utility that runs before the game to allow for them
-
- Posts: 50
- Joined: Tue Mar 09, 2004 9:53 pm
- Location: Spain
This is listed in the change for version 0.6 so it might be possible to look through the script whrere this is defined and use some of the code from there to make your own class for expanding it to pre-defined sizes by you.- It is now possible to make the drawing window resizeable, if it is in windowed mode.
Use IVideoDriver::setResizeAble(true) to do this.
You are right, it would probably be a possibility. But a function to change values like fullscreen, bitdepth, and the other dx/opengl parameters at engine-runtime would be very nice
You can write your own function, I know, and it is not really important, but neverthless it would be nice
greets,
mq
You can write your own function, I know, and it is not really important, but neverthless it would be nice
greets,
mq
[Knowledge is king]
-
- Posts: 16
- Joined: Mon Jan 12, 2004 4:31 am
- Location: USA
- Contact:
Unfortunately, there's not much you can do regarding this little change, because the monitor has to switch resolutions/refresh rates when the device resolution changes, so the most efficient way to do this would be to pause the game, drop the device, and create a new one with the fresh parameters. God only knows what kind of chaos would be caused if you tried changing this stuff mid-game.mq wrote:Wouldn´t it be possible to implement a function to the engine like changeDevice()?That´s what I want to avoid.May games acutally work this way which is why they often pause when you change a resolution setting.
greets,
mq
Of course it would be possible. It is only a matter of the way how you do it. But maybe it is also depending from the engine. If the different layers of the engine (video, scene,...) are independent written, it is no problem to change resolution, parameters, etc without loading the whole game again
greets,
mq
[edit]
Of course in the end you delete and create a new device. But the point is that it should not affect any other parts of the engine so you can easily write a function "changeResolution()" or so
[edit2]
Many games that are not based on the Q3 engine can do change any parameters without loading the whole game again
greets,
mq
[edit]
Of course in the end you delete and create a new device. But the point is that it should not affect any other parts of the engine so you can easily write a function "changeResolution()" or so
[edit2]
Many games that are not based on the Q3 engine can do change any parameters without loading the whole game again
[Knowledge is king]