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/movingeffects/MovingEffectsRenderer.java
197 197
     android.util.Log.e("MovingEffects", ex.getMessage() );
198 198
     }
199 199

  
200
///////////////////////////////////////////////////////////////////////////////////////////////////
201

  
202
   public int openGlVersion()
203
      {
204
      Context context = mView.getContext();
205
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
206
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
207
      int glESversion = configurationInfo.reqGlEsVersion;
208
      int major = glESversion >> 16;
209
      int minor = glESversion & 0xff;
210

  
211
      return 100*major + 10*minor;
212
      }
213

  
214 200
///////////////////////////////////////////////////////////////////////////////////////////////////
215 201

  
216 202
   public InputStream localFile(int fileID)

Also available in: Unified diff