Hey all,
I have a brief question about how you are handling loading and unloading of your GL resources. My main problem is that everything requires a valid GL context, which I only really have in the onDraw() method.
I'm currently doing my loading in a subcall from the onSurfaceCreated() method, which works well, but I have no idea where to handle the equivalent unloading?
My main idea right now is to let each game state have a flag telling the manager if they've initialized/deinitialized their GL resources, and then during the onDraw() method it checks for those flags and calls the appropriate methods to load/unload. Although it feels very backwards in a way to do it like that so I'm sure there's a better way.
Please let me know of how you're doing it or if you have any general tips for me!
Cheers

