Changing graphics mode at run-time
Blitz3D Forums/Blitz3D Programming/Changing graphics mode at run-time
| ||
Is it possible to do this? I'm thinking about having an option to allow my users to switch between full-screen and scaled windows, but when I try to switch in mid-game it causes a crash. |
| ||
Yes is possible. There are a lot of posts talking about this subject. What you need to do is to have your own function of resource loading and then, when resolution changes, load again all the resources... Look for this posts at the forum because not much time has passed from this subject was discused. May be a good idea to install the latest update of Blitz because all of the features are focused in solve some problems regarding this.. Regards! |
| ||
there have been a code-archive entry about this. dont know where it get to sorry... |
| ||
you must only reload ALL the graphics, if you change the resolution. bye |
| ||
Note that it is not enough to just reload resources after changing the resolution, but you also have to be concerned with the state the resources where in. Example, if you've loaded a model which the user can rotate and/or scale, you have to keep track of the models current angle/scale-factor so that when it's reloaded, the model can be re-rotated and re-scaled to the state it was in just before mode change. Also, to second what Pinete said: get version 1.99 of Blitz3D (if you already haven't) as it addresses several problems others where having with doing stuff simmilar to what it is you want to do. |
| ||
Ok thanks, that was the problem, it couldn't recognise a graphic, so I'll start working on this. |
| ||
It does look like the new update will fix this. But as always I can't find the 'products update' page, can someone tell me where I'll find the new updates? |
| ||
Account-Product Updates. I suggest you have an option to change gfx mode, but the program will write "fullscreen" or “windowed” to a text file, and every time the program opens, and sets the gfx mode to the stuff on the text file... |
| ||
Good idea, I'll do that. Thanks for reminding me where the update is :) |
| ||
Glad to help ;) |