Project

General

Profile

« Previous | Next » 

Revision 625c67de

Added by Leszek Koltunski about 1 year ago

Decouple (to a large degree) the OpenGL Library from Android.

View differences:

src/main/java/org/distorted/examples/objecttree/ObjectTreeRenderer.java
218 218
      android.util.Log.e("ObjectTree", ex.getMessage() );
219 219
      }
220 220

  
221
///////////////////////////////////////////////////////////////////////////////////////////////////
222

  
223
    public int openGlVersion()
224
      {
225
      Context context = mView.getContext();
226
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
227
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
228
      int glESversion = configurationInfo.reqGlEsVersion;
229
      int major = glESversion >> 16;
230
      int minor = glESversion & 0xff;
231

  
232
      return 100*major + 10*minor;
233
      }
234

  
235 221
///////////////////////////////////////////////////////////////////////////////////////////////////
236 222

  
237 223
    public InputStream localFile(int fileID)

Also available in: Unified diff