Windowed <-> Fullscreen

Blitz3D Forums/Blitz3D Programming/Windowed <-> Fullscreen

AJirenius(Posted 2007) [#1]
Is there any simple way to switch between fullscreen and windowed mode in Blitz3D. I know GA implanted great features in his framework for BMax but when trying to call Graphics3D again it just seems to crash. What to do?


jfk EO-11110(Posted 2007) [#2]
There's a problem when you reset the graphicsmode, using Graphics or Graphics3D: All loaded graphics and 3D stuff is erased. The handles are still there, but the media is gone, so it will MAV. What you can do is:

Pack all loading code into a reentrant function (one that can be called multiple times without to crash). Then right after the user altered the graphics mode, call the function to reload everything.

If you want the game to continue right where the player was before, then you need a powerful savegame/loadgame function, that I suggest to implement from the beginning on. It's hard to impossible to add a good savegame/loadgame functionality to an existing game.


D4NM4N(Posted 2007) [#3]
you can simulate fullscreen with the win32? decals :- ie remove the bar and borders then scale to the desktops X&Y dims. I cant find a copy of the code tho, try the arcs.


@rtur(Posted 2007) [#4]
There is a way to switch between fullscreen and windowed mode without losing all resources. Set window properties and then Reset directX device.
But I haven't implemented it yet.


Kev(Posted 2007) [#5]
AJirenius, if its ok to simulate fullscreen winblitz3d beta v1.1 now has support for this.

kev