How to change graphics mode?

Blitz3D Forums/Blitz3D Programming/How to change graphics mode?

mrtricks(Posted 2003) [#1]
I saw this a while back but I can't find it. Is there a command to kill the current graphics mode before setting a new one? If not, how do you do it mid-program? I keep getting illegal memory errors.


DrakeX(Posted 2003) [#2]
endgraphics

:)

also when you change graphics modes all images/textures are wiped and you have to reload them..


jhocking(Posted 2003) [#3]
I've never used EndGraphics because calling Graphics3D again automatically wipes all the graphics. As DrakeX points out you have to reload everything when you change the graphics mode (easy to do if you have a separate level loading function; just call that every time you use Graphics3D.)


mrtricks(Posted 2003) [#4]
Thanks... Just figured out a way to do it by ending the program and restarting itself, but it's not ideal. This should help!


jhocking(Posted 2003) [#5]
You shouldn't have to resort to that kludge. There isn't (or at least shouldn't be) any problem just calling Graphics3D. As we've already mentioned the illegal memory errors you are getting are probably due to the graphics being purged from memory; this happens when you call Graphics3D.


mrtricks(Posted 2003) [#6]
Yeah, it works now: the only thing is, I've found going from a windowed res to another windowed res slows the program down a hell of a lot.