Question

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?

Was it helpful?

Solution 2

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top