Amelia@Amazon avatar image
Amelia@Amazon posted

How to fix OpenGL Context Crashes when querying capabilities.


An Android bugfix has created a requirement to create an OpenGL context in order to query GL Attributes


When running your app on Android 5.0, you may notice that any OpenGL queries that you have made in previous versions of Android without creating an OpenGL context first will now cause the application to crash. For how to deal with losing your OpenGL Context in Android and how to recover the object properly, Google has a really good video describing how to recover your context.


Make sure that your context is valid when performing glSwapBuffers(), eglGetConfigs, etc. It will return EGL_FALSE, If that is the case, you will need to invalidate the context, display, and view of your OpenGL app, then rebuild them to a known good state.

Setting up your OpenGL Environment: Game On! - Surviving OpenGL Context Loss:

Keywords: Resolution, Context, OpenGL, Bugfix


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.



brizzlebrazzle contributed to this article