With a little fun I finally got it to work. Here is the code if anyone wants to do the same
boolean isOpenGl2 = false;
try {
Method setEGLContextClientVersion = GLSurfaceView.class.getMethod(
"setEGLContextClientVersion", int.class );
/* success, this is a newer device */
setEGLContextClientVersion.invoke(mGLView, 2);
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView));
isOpenGl2 = true;
Log.d("WW", "Using OpenGL 2.0");
} catch (NoSuchMethodException e) {
Log.d("WW", "Fail to find setEGLContextClientVersion, must be an older device.");
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
if(!isOpenGl2){
Log.d("WW", "Using OpenGL 1.1");
}
However with AA it slowed even my Galaxy Nexus to 17fps, so looks like that is off the table
Though it looked a lot nicer!
Then it was crashing when I removed the AA line.
03-01 20:32:12.204: D/WW(28677): Using OpenGL 2.0
03-01 20:32:12.266: D/libEGL(28677): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
03-01 20:32:12.266: D/libEGL(28677): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
03-01 20:32:12.266: D/libEGL(28677): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
03-01 20:32:12.384: D/OpenGLRenderer(28677): Enabling debug mode 0
03-01 20:32:12.407: W/dalvikvm(28677): threadid=11: thread exiting with uncaught exception (group=0x40a721f8)
03-01 20:32:12.407: E/AndroidRuntime(28677): FATAL EXCEPTION: GLThread 1182
03-01 20:32:12.407: E/AndroidRuntime(28677): java.lang.RuntimeException: createContext failed: EGL_BAD_CONFIG
03-01 20:32:12.407: E/AndroidRuntime(28677): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1164)
03-01 20:32:12.407: E/AndroidRuntime(28677): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1156)
03-01 20:32:12.407: E/AndroidRuntime(28677): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1003)
03-01 20:32:12.407: E/AndroidRuntime(28677): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1348)
03-01 20:32:12.407: E/AndroidRuntime(28677): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1202)
03-01 20:32:12.743: D/OpenGLRenderer(28677): Flushing caches (mode 0)
03-01 20:32:13.009: D/OpenGLRenderer(28677): Flushing caches (mode 1)
03-01 20:32:15.837: I/Process(28677): Sending signal. PID: 28677 SIG: 9
Why would it crash just from removing this line?
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView));