Stutter when setting canvas visibile first time
Posted: 22 Dec 2013, 18:19
I have a canvas that I programmatically set visible and hidden based on events in my game. This canvas is constantly animating (it shakes back and forth continually) and has children that are also programmatically set visible and hidden based on other events. These children are base Controls which frequently change their Templates. The parent canvas always starts hidden.
The first time, and only the first time that this canvas is set to visible there is a very noticeable stutter. Is there a way to mitigate this? Can I mask whatever time-consuming operation Noesis doing on when it first becomes visible by having it perform that operation without actually drawing the canvas? I've tried hacky solutions like positioning the canvas offscreen for a frame but it seems that whenever I draw it on screen for the first time it always causes my game to stutter.
The first time, and only the first time that this canvas is set to visible there is a very noticeable stutter. Is there a way to mitigate this? Can I mask whatever time-consuming operation Noesis doing on when it first becomes visible by having it perform that operation without actually drawing the canvas? I've tried hacky solutions like positioning the canvas offscreen for a frame but it seems that whenever I draw it on screen for the first time it always causes my game to stutter.