MonoTouch OpenGL application loses texture data when moving to background

I have a MonoTouch OpenGL application that has a bunch of textures in it. When the user presses the iPhone button to move the application in the background, all my texture data seems to go away. I just see a solid color filling the triangles I draw with the textures initially loaded.

Any new textures that I load after resuming from the background state are displayed correctly. These are just textures that were loaded before the application was moved to the background, which appears solid.

The docs state that “your application must store textures, models, and other assets in memory” when it moves to the background. I do nothing with my textures, but something makes them.

Any ideas?

+3
source share
1 answer

My solution was to not use iPhoneOSGameView. This fixed all the problems associated with the disappearance of textures when my application became a thing of the past. The code for managing the framebuffers and the update timer itself is quite simple, and I found extra clarity (and work with recovery from the background) to do my best.

iPhoneOSGameView , :

+2

Source: https://habr.com/ru/post/1786510/


All Articles