OpenGL ES extensions - NDK versus Java

87 views
Skip to first unread message

matt

unread,
Jan 11, 2017, 1:17:14 PM1/11/17
to android-ndk

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).

Joshua Zhu

unread,
Jan 12, 2017, 11:17:48 AM1/12/17
to andro...@googlegroups.com
Try use glGetStringi()

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3c06a013-3d70-4b22-bbb6-b818aecb0a64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

matt

unread,
Jan 13, 2017, 1:32:00 AM1/13/17
to android-ndk
You're right. glGetStringi returns a different set of extensions than glGetString(GL_EXTENSIONS). Thank you! 


On Thursday, January 12, 2017 at 11:17:48 AM UTC-5, Joshua Zhu wrote:
Try use glGetStringi()

2017-01-12 1:45 GMT+08:00 matt <matt...@gmail.com>:

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).

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.

Dan Albert

unread,
Jan 13, 2017, 3:48:15 AM1/13/17
to android-ndk
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.

To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.

Joshua Zhu

unread,
Jan 17, 2017, 1:37:34 PM1/17/17
to andro...@googlegroups.com
Thanks, __android_log_print is the root cause.

Reply all
Reply to author
Forward
0 new messages