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

Related Discussions

  • Interface Android Keystore From NDK in Android-ndk

  • *Introduction* I am currently working on a solution that would use Android Keystore new features (since Marshmallow , API level 23). My app use both Java and C++ (NDK) and I have some critical operation that needs to be perform from native code. I am able to use properly the new Keystore from Java. Unfortunately, the Android C++ sources are not documented and I have tried to look ...

  • Mixing Native With Java in Android-ndk

  • Hello all, I'm pretty new to Android development and would like to know if the following is even possible : We have a project in-house entirely written in Java (using Java UI and such). What we are trying to achieve is to make the program's entry point a NativeActivity now to get a tight OpenGL rendering loop for our in-house rendering engine written in C++. Because a lot of work has been...

  • NDK And Condition_variable in Android-ndk

  • Hi all, I have a c++ library that uses timed condition variables to schedule tasks in one of its threads. Now I want to be able to use this library from a Java Android app, and some of those native threads to call back into Java using JNI. I've been made aware however that Android apps schedule tasks in a special way (inside a single foreground thread). Is it possible to mix both approaches...

  • Extend Ndk Native Activity API in Android-ndk

  • Hi, I'm dealing with a crazy problem here. *Short version* How can I extend the API of native activity to send some data from java to my native rendering thread? The java side is trivial, I'm stuck on the C++ side. *Long version:* I'm developing a game which needs the phone's orientation. On the native side I've tried using gyro/accel which has too much error for what I need. I ...

  • Need Some Advice NDK And JAVA in Android-ndk

  • Hey Guys, So some back ground information: I am trying to develop Packet Sniffing application for Android using NDK. So all the packet capturing is done by C executables that I am running using Java. My problems currently is to get the information back and display real time The requirements that I need follow are 1) display summary information on View and then 2) if a user ...

  • Crash On Calling Java From C++ (via JavaVM Being Passed Through Ndk Built Shared Lib To A Prebuilt Shared Lib) in Android-ndk

  • Hi All, Till now using ndk and jni went fine but now I ran into an issue I cannot figure out:( What worked till now was that I was able to build within my java project a shared c++ lib (call it jhi) that was called via jni which in turn called a prebuilt c++ shared library (call it hilib). So in short the call sequence went like: java->jhi->hilib But now I'd need to call back to java...

  • Can We Dubug A Native Process Using Ndk-gdb That Is Started Using ProcessBuilder In Java Code in Android-ndk

  • I am trying to debug an android application which starts an executable (openvpn) using process builder in java code. I would like to step into the code of the executable and go through the code flow. wanted to know if i can use ndk-gdb to do that ? If yes, what would be the best way. If not, what can be done in that case. Could any one please guide me on this ? Thanks You received...

  • Call Android Java Codes From C++ in Android-ndk

  • Hi; I'm using Qt Creater IDE. When I compiled my JNI code for Android ARMv7, I get this error: *Cannot find -ljvm*. Whereas I included this parameters in the .pro file: https://paste.ubuntu.com/23787345/ Then I found other *jni.h* files. They are in that positions: https://paste.ubuntu.com/23787350/ Also I think I need *libjvm.so* file for JNI. *libjvm.so* file is in that position...

  • Unable To Make JNI Call From C++ To Java In Android Lollipop Using Jni in Android-ndk

  • Hi, I am making a library app which detects native crashes in android using google breakpad. Whenever my main app has a native crash, breakpad invokes the following callback. From this callback, I need to call a static void method in a java class using JNI. *bool breakpad_callback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) { JNIEnv* env...

  • Help Needed In Creating Native GUI Based Android Application (No JAVA) in Android-ndk

  • Dear all, Is it possible to create a native application having GUI with out using Java? I wanted the following UI components to be shown in my native app. Basically I am trying to create a video player view. 1. Buttons and its event implementations 2. Surface View Please suggest me on this. Thanks & Regards, Manoj. You received this message because you are subscribed to ...

  • Camera Access Outside Of Java/OpenCV in Android-ndk

  • Hey All, I’m trying to write an app with Qt for Android that grabs frames from the camera. I understand that there is some trickiness and that the best approach is to go either Java or OpenCV. I’m not sure how I’d incorporate Java into my c++ code, and although I have most of OpenCV working I can’t seem to get the native camera library to be recognized. I think the reason for...

  • Java.lang.UnsatisfiedLinkError: Native Method Not Found in Android-ndk

  • Hi , I am seeing a weird behavior in my app . My app is a hybrid app ( java + C++ ) . It has a bunch of native libraries . If I load all of native libraries in one shot from java via System.load() everything works fine but if I delay load some of them at a later point of time via dlopen and at that point of time there happens to be a jni call on another thread app crashes with java...

  • JNI Java/C++ Library Suport in Android-ndk

  • Can I make an Java wrapper for c++ library using JNI and use it in android? As in android-ndk-r10/docs/Programmers_Guide/html/md_3__key__topics__libraries__c_p_l_u_s_p_l_u_s-_s_u_p_p_o_r_t.html it is said that C++ support is minimal. I have a big c++ library and wondering if I could use it. You received this message because you are subscribed to the Google Groups "android-ndk" group. ...

  • Unable To Dynamically Link Shared Obj Libs To Make Executable Run in Android-ndk

  • Hi, I have built a gcc cross-compiler using ndk-r9b and compiled a fortran program with it. Now I want to run my executable from my java code. 2 issues - 1. to enable correct dynamic linking, trying Runtime.getRuntime().exec("export LD_LIBRARY_PATH=/data/app-lib/the.class.name:$LD_LIBRARY_PATH); but get *W/System.err( 1686): java.io.IOException: Error running exec(). Command: [export...

  • Long Running Task: Native Or Java Thread? in Android-ndk

  • Hey everyone! I'm building an App that is supposed to run a task in a loop until the user gives a stop command. I have read that native code runs in the thread that started it, so the question now would be whether it's better to start a Java thread that then runs the native function in a loop, or if there are advantages to starting the thread on the native side? The task is a calculation...

  • Java Strings Causes Segmentation Fault In JNI Native Code in Android-ndk

  • I'm trying to use a Swig generated JNI wrapper for a Haskell library. After much work, I finally got the cross compilation working and I am able to System.load the .so file. The JNI functions all take a input object and returns a output object. However, I only manage to call functions where the input object has no fields. If I try a object which have two fields which I set using the Swig...

  • Vivat NativeActivity, No Need For Native_app_glue in Android-ndk

  • In textbooks about the NDK always they refer to native_app_glue as the standard way to communicate between Java and C. But actually, native_app_glue is very restrictive. Only a small subset of all functionality provided by the Android framework is made available to the native part. Another interface between Java and C is NativeActivity, where the native and the Java environment are in...

  • Project Dependencies Using Experimental Gradle Plugin in Android-ndk

  • I'm building a library project with native code using the experimental toolchain. When I add an app and/or test module and set a dependency on my library project... apply plugin: 'com.android.model.application' ... dependencies { compile project(':myLibraryProject') compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' } it doesn't seem to...

  • Ioctl Calls On Fd Passed From Java UsbManager in Android-ndk

  • Hi. I am trying to communicate with a Webcam connected via USB. Since I do not have permissions on /dev/video4 (the device node for my webcam) I thought it would be best to ask for permission via the UsbManager class and then pass the file descriptor to C. This looks good, the fd is a read-write file descriptor and is open (both checked with fcntl), but whenever I try to perform any ioctl...

  • Tag Traffic Using Grpc In C++ in Android-ndk

  • Hello all, I'd like to know how many bytes are transmitted using grpc in C++. Java has TrafficStats#setThreadStatsTag to tag the traffic and read it later. Is there any similar solution in C++? I tried to use JNI to invoke Java TrafficStats to tag the traffic, it did not work. You received this message because you are subscribed to the Google Groups "android-ndk" group. To unsubscribe...

Facebook Google+ Twitter Linkedin
 Discussion Overview

 Group: Android-ndk

 asked: Jan 11 2017 at 09:45

 active: Jan 16 2017 at 23:41

 posts: 5

 users: 3