When I run glGetString(GL_EXTENSIONS) in my NDK code, I get a list of 38 
extensions. If I switch to Java and run
GLES32.glGetString(GLES32.GL_EXTENSIONS), I get a list of 74 extensions.
I assume the problem is that my application links to libGLESv3.so, which
doesn't provide features beyond OpenGL ES 3.0. It would be nice if the NDK
provided libGLESv32.so, but I can't find one.
Is there any way to access those extra extensions in an NDK application?
I've heard I should link to GLESv2 instead of GLESv3, but when I do that, I
get a bunch of undefined references (glMapBufferRange, glBindVertexArray,
and so on).
matt 's gravatar image asked Jan 11 2017 at 09:45 in Android-Ndk by matt

4 Answers

Try use glGetStringi()
2017-01-12 1:45 GMT+08:00 matt
Joshua Zhu 's gravatar image answered Jan 12 2017 at 00:16 by Joshua Zhu
You're right. glGetStringi returns a different set of extensions than glGetString(GL_EXTENSIONS). Thank you!
matt 's gravatar image answered Jan 12 2017 at 13:56 by matt
For anyone else landing here, this was discussed on
https://github.com/android-ndk/ndk/issues/279
The reason for the difference in output is that __android_log_print
truncates to 1KiB/line.
'Dan Albert' via android-ndk 's gravatar image answered Jan 13 2017 at 00:47 by 'Dan Albert' via android-ndk
Thanks, __android_log_print is the root cause.
2017-01-13 16:47 GMT+08:00 'Dan Albert' via android-ndk
Joshua Zhu 's gravatar image answered Jan 16 2017 at 23:41 by Joshua Zhu