BUG / issue / problem with video memory in bmax

BlitzMax Forums/BlitzMax Programming/BUG / issue / problem with video memory in bmax

Robert Cummings(Posted 2005) [#1]
If you run your game, then run a game such as luxor full screen, then when you come back to your game, all the graphics are garbage / non-existent including text commands etc...

Is / will there be a solution to this? Other games I've played can handle this occuring just fine. I think it's important in the casual game world. People often load more than one thing without a clue.


MrCredo(Posted 2005) [#2]
hm... this is known problem... not only with blitzmax... some companys have/had also problems with this.

i would also like a advanced commands to handle this. At the moment you can add only "reload-functions". after you hit F5 or (after a event) you can reload images...


Dreamora(Posted 2005) [#3]
With the actual BM version, you can use the Events to check when your window becomes active and reload all media.
This is the way other games do it, which is the reason they take quite some time to show up, when you open their minized windows again.


Robert Cummings(Posted 2005) [#4]
I am talking about windowed mode. Other companies restore surfaces only when the surfaces are lost. I would like to have an if lost command so I when I resume from suspended, I can reload media.

On the desktop, an app for example will lose everything. In windowed mode this is unacceptable...


Dreamora(Posted 2005) [#5]
And?
Thats what the events are for that came in with BM 1.12 (for all not only BM GUI users).

Check if the window activate event happens, this means that you have to reload the media stuff again (or just recreate textures out of the pixmaps that are still stored within the TImage structure when I remember correctly - this is faster than really reloading the data)


Robert Cummings(Posted 2005) [#6]
Dreamora, there are no games I have ever played that will reload ALL the graphics just because I click outside the window and back inside the window.

Do you understand the ramifications of what I am saying or have I misunderstood you?

1. user is running a windowed bmax app.

2. user checks email and game correctly pauses thanks to AppSuspend()

3. user clicks inside the window to resume the app. OH NO! 10 seconds of loading all the graphics again!


Is this what you are saying?


Robert Cummings(Posted 2005) [#7]
You mention recreate from pixmaps. Perhaps there should be a command for this? then it would be very fast indeed and solve my problem.

This issue doesn't happen under opengl btw.


Difference(Posted 2005) [#8]
I'm with One Eyed on this.
We need to know what to do/how to handle loss of focus without reloading. Reloading is ok in fullscreen, but not for windowed apps.


Mark Tiffany(Posted 2005) [#9]
Does the latest syncmods fix this?

http://www.blitzbasic.com/Community/posts.php?topic=53973

Or is this a special version of the problem? i.e. fullscreen now works, but windowed mode doesn't? The thing is, I don't believe windowed mode in "vanilla" Max has ever been officially regarded as anything other than a debug mode. I suspect the line is that if you want to do a windowed game, use MaxGUI?


Robert Cummings(Posted 2005) [#10]
The latest syncmods do not fix this.
Windowed is no longer a debug mode, but a valid mode and maxgui will not change the outcome of the issue.