Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GLRenderer will not run when resuming app  RSS feed

Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm displaying a dialogue over my GLRenderer and then dismissing it from my Renderer's onSurfaceChanged method (once all resources have loaded and just before rendering starts)

When I first run my app - all works great, my loading screen is displayed while all my resources / textures load.

However, using the code below, when I press the home key and resume the app, all I get is the loading screen - it never actually disappears, and the renderer never actually starts again (I've confirmed this, onSurfaceCreated doesn't even run).

If I create a new 'myView' object (again, you can see this line in the code, commented out), then it does work. However, this is out of the question and shoudn't be necessary anyway.

So, how can I get it to run like it does the first time (without creating a new GLRenderer each and every time and also while displaying my loading graphic?)

PS (if I remove the setContentView() line from the onRestart method, then it does run but the dialog doesn't come up, it only flashes up for a split second)

Any help would be appreciated

Here is my code:

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!