I downloaded Android NDK r9 and compiled a sample application. I have a Galaxy Nexus smartphone with Android 4.3 upgrade.
How can I find out programmatically if OpenGL ES 3 is supported on my device?
I downloaded Android NDK r9 and compiled a sample application. I have a Galaxy Nexus smartphone with Android 4.3 upgrade.
How can I find out programmatically if OpenGL ES 3 is supported on my device?
The answer is in the Android OpenGLES docs. Essentially, try to create a 3.0 EGLContext
, and if that fails you know that 3.0 is not supported.
The page also shows an alternate approach: create a context for a lower level (1.x or 2.x) and use that to call glGetString(GL_VERSION)
. If the version string indicates that 3.x is supported, you would destroy that context and create a new one.
Update: this approach can be seen in Grafika's EglCore class. Follow what happens when FLAG_TRY_GLES3
is passed to the constructor.
First, take a look to Is there a way to check if Android device supports openGL ES 2.0?. Also, take a look to Basemark ES 3.0