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/girl/GirlRenderer.java
226 226
     android.util.Log.e("Girl", ex.getMessage() );
227 227
     }
228 228

  
229
///////////////////////////////////////////////////////////////////////////////////////////////////
230

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

  
240
      return 100*major + 10*minor;
241
      }
242

  
243 229
///////////////////////////////////////////////////////////////////////////////////////////////////
244 230

  
245 231
   public InputStream localFile(int fileID)

Also available in: Unified diff