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/olimpic/OlimpicRenderer.java
223 223
     android.util.Log.e("Olympic", ex.getMessage() );
224 224
     }
225 225

  
226
///////////////////////////////////////////////////////////////////////////////////////////////////
227

  
228
   public int openGlVersion()
229
     {
230
     Context context = mView.getContext();
231
     final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
232
     final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
233
     int glESversion = configurationInfo.reqGlEsVersion;
234
     int major = glESversion >> 16;
235
     int minor = glESversion & 0xff;
236

  
237
     return 100*major + 10*minor;
238
     }
239

  
240 226
///////////////////////////////////////////////////////////////////////////////////////////////////
241 227

  
242 228
   public InputStream localFile(int fileID)

Also available in: Unified diff