In my application, I’m using a 3rd party custom view that calls OpenGL functions in Java, and I’m also calling OpenGL functions in my native C++ code.
Should this be a problem?
Is there any risk that they could be called at the same time?
What is the threading order of OpenGL calls across java/c++?
This should not be a problem, as long as you know what you’re doing. The OpenGL Java bindings in Android basically just call the same c++ function. There’s not more logic in those calls. So you can basically think of those calls in the same way as if they were direct c++ code.
The problem that you are more likely to run into will be that OpenGL is not threadsafe if you have only one context. So if two threads try to call gl methods in the same context (which is usually the case in just a single app) this will cause problems. You can forego these problems by calling eglMakeCurrent, to make your current thread the current OpenGL thread. And then you can make your gl calls as usual.