1.7.3 loading errors when game is minimized
by Eyal Erez · in Torque Game Builder · 06/11/2008 (10:42 am) · 4 replies
I've noticed that when I minimize the game window, 2td objects (sprites and text) do not load properly.
Lets say that I have a schedule to load a sprite or text. I minimize the window and wait for them to load. once I bring back the game window there is a white sprite displayed instead of the textured sprite or the text sprite.
Anyone experience that before?
Lets say that I have a schedule to load a sprite or text. I minimize the window and wait for them to load. once I bring back the game window there is a white sprite displayed instead of the textured sprite or the text sprite.
Anyone experience that before?
#2
I never found a solution for this, just a very ugly workaround.
In my game it only happened in the first mainMenu.gui so I think I would reload all the images in the gui every time the game would loose focus or get back into focus. I can't remember , it was a long time ago. but it did work.
10/20/2009 (11:42 pm)
I am not sure if this was fixed in 1.7.4.I never found a solution for this, just a very ugly workaround.
In my game it only happened in the first mainMenu.gui so I think I would reload all the images in the gui every time the game would loose focus or get back into focus. I can't remember , it was a long time ago. but it did work.
#3
Thanks for pointing me in the right direction Eyal and here is how I reload the textures if anyone stumbles across the same problem in the future. It's not optimal but it works :)
10/21/2009 (7:43 am)
I haven't been able to try if 1.7.4 fixes this but I did implement a solution in line with what you describe where I flush the texture cache when the window gains focus.Thanks for pointing me in the right direction Eyal and here is how I reload the textures if anyone stumbles across the same problem in the future. It's not optimal but it works :)
function onWindowFocusChange( %focused )
{
if( %focused )
flushTextureCache();
}
#4
This the only proper workaround and is there any huge performance issues?
Just noticed there's a huge half second hiccup every time this is used so it's very poor... any other solutions would be ideal.
10/28/2012 (2:01 pm)
Resurfacing this thread as I'm having the issue now where a user leaves their game minimized for a while and comes back to squashed text objects. Running flushTextureCache() does immediately resolve the problem.This the only proper workaround and is there any huge performance issues?
Just noticed there's a huge half second hiccup every time this is used so it's very poor... any other solutions would be ideal.
Torque 3D Owner Torbjorn Leksell
Narcissistic Studios