View Full Version : BlitzMax : How to toggle Windowed/Fullscreen ?
If any of you use blitzmax and know how to do this properly, please share :)
I was able to do this by just calling Graphics(...) again with different parameters, and it works, BUT, every time I switch like that my memory usage goes up crazy. Obviously I'm leaking everything here, and I tried calling EndGraphics before Graphics() but nothing helps.
Actually, I tried this game C'Bubble which also uses blitzmax, and they have the same problem, memory usage climbs every time graphics mode is changed.
I hope this isn't a bug and can be properly solved. I posted on their forums, but no luck there at all :(
Thanks in advance for any suggestions,
Dima
Robert Cummings
11-29-2005, 11:26 AM
This is answered on the blitzmax forums. Cross posting isn't advisable because this forum does not have many blitzmax users.
Someone replied, but I saw no answers :), either way if this is a problem, I apologize.
Indiepath.T
11-29-2005, 12:19 PM
If any of you use blitzmax and know how to do this properly, please share :)
I was able to do this by just calling Graphics(...) again with different parameters, and it works, BUT, every time I switch like that my memory usage goes up crazy. Obviously I'm leaking everything here, and I tried calling EndGraphics before Graphics() but nothing helps.
Actually, I tried this game C'Bubble which also uses blitzmax, and they have the same problem, memory usage climbs every time graphics mode is changed.
I hope this isn't a bug and can be properly solved. I posted on their forums, but no luck there at all :(
Thanks in advance for any suggestions,
Dima
Memory should not climb everytime you switch. In cbubble we just re-call the GFX command, any leftovers are cleaned up by the garbage collector.
Thats what I would have though, but it does climb, at least on my machine. Every switch adds a few megs to the apps memory usage.
Indiepath, can you please let me know if it does the same for you?
TIA
Sharpfish
11-29-2005, 01:40 PM
Everytime you call GRAPHICS are you not creating another abstracted device? Is there a way to physically drop the device (While keeping the app running).
I haven't dabbled with Bmax since the 1.09 demo so can't remember - just check you are actually releasing the device and not just creating another new one that occupies your app window.
Well, that is how it would work/fail with Pure DirectX in an abstract engine, Blitz obviously has it's own ways of doing it.
I have tried the following out on my machine, and the memory doesn't increase even if I call it a hundred times!
While(1)
Graphics 800,600
Cls
DrawRect 100,100,200,200
Flip
WaitKey
EndGraphics
Wend
End
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.