Hello,
I'm developing a game for Android, and I made it using OpenGL ES 2.0. Now I want to add support for devices that do not have OpenGL ES 2.0 support, and use OpenGL ES 1.0 instead.
My problem is that I can't seem to detect the right OpenGL ES version. I used the example in the SDK, but it simply returns 0 on my Legend.
This is what I've tried:
ActivityManager am = (ActivityManager) getSystemService(getApplication().ACTIVITY_SERVICE);
ConfigurationInfo info = am.getDeviceConfigurationInfo();
String eglVersion = info.getGlEsVersion();
if (eglVersion == "2.0") GameLibrary.load_gl20();
else GameLibrary.load_gl10();
(GameLibrary is a class containing some native methods, and load_glxx are static methods calling System.loadLibrary() with the specific library for the right opengl ES version) The problem is as i said before, info.getGlEsVersion() returns "0.0"