OpenGLContext

Hey all…

I’ve noticed that Android apps are unstable at best and it seems to be related to simpleInit being called before the OpenGLContext is finished being created. This is only while the app is starting and if it doesn’t crash, it runs great. The errors that are thrown are random and it doesn’t happen all the time. But, happens enough to be of concern. The exceptions range from:

BIHTree exception
to
BitmapFontLoader exception
to
Random classes throwing an NPE

So, I guess the question is, how would query the OpenGLContext to ensure that it is finished doing whatever it needs to before attempting to load my game?

This does not ever happen on Desktop and is VERY spiratic on Android

3.1 was changed already to start the app on the first drawFrame instead of during the surfaceCreated callback. This will ensure the surface view is done being created before the app initializes.

This will fix a few things including supporting device resolution settings in MainActivity and having the new resolution available during simpleInit for gui layout.

1 Like
@iwgeric said: 3.1 was changed already to start the app on the first drawFrame instead of during the surfaceCreated callback. This will ensure the surface view is done being created before the app initializes.

This will fix a few things including supporting device resolution settings in MainActivity and having the new resolution available during simpleInit for gui layout.

Awesome!

Is there any way I can avoid this until 3.1 is available?

Also, will the new audio engine be the default in 3.1 as well?