Reply – Re: Gluegen apk won't install on Android 6 (Marshmallow)
Your Name
or Cancel
In Reply To
Re: Gluegen apk won't install on Android 6 (Marshmallow)
— by kjkrum kjkrum
Hey, it's Kevin from SO.  I use IDEA almost exclusively.  I have a bunch of questions, but I thought it would be good to start with a little background about how I became interested in JOGL.

I'm a professional Android developer whose day job mainly involves boring point-of-sale stuff.  I decided to learn about OGL and read a few books and tutorials about how it's done with the android.opengl.* APIs.  I quickly realized that Google made a big mistake by not using interfaces for their GLES2+ APIs.  They included the Khronos GLES1 interfaces in the standard Android API, but starting with GLES2, everything is done with static methods.  I found JOGL when I went looking for a library that uses interfaces.


- What are the JOGL equivalents of GLSurfaceView and GLSurfaceView.Renderer?  (GLSurfaceView is the Android-managed view that holds the GL surface; Renderer is the callback that is called when the GL context is created and when each frame is rendered, among other things.)

- Can a JOGL surface be declared in layout XML?

- Is it possible to use JOGL without extending a particular Activity?  (Early versions of some Google APIs used required extending activities, like MapActivity and PreferenceActivity, but this proved to be a very restrictive anti-pattern, and newer versions have moved away from it.)

- What does a minimal JOGL "Hello, world!" look like?  I mean something like an empty black screen rendered with OGL.

- Why are there multiple native jars for each architecture?  What's in them, and are all of them always required?

- Why do some tutorials suggest that JOGL apps require other APKs to be installed alongside them?  Can this be avoided?

- Why does gluegen parse C headers instead of the Registry XML from which the C headers are derived?  Was the XML not available when gluegen was originally created?  Would gluegen benefit in any way from being converted to use the XML?

- I noticed from reading the code that JOGL relies on global state.  Global state is especially evil on Android because of the way the framework manages activities and other components.  I also noticed some comments hinting at problems caused by this.  Could this be avoided without breaking compatibility with other platforms that JOGL supports?