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/monalisa/MonaLisaRenderer.java
178 178
      android.util.Log.e("MonaLisa", ex.getMessage() );
179 179
      }
180 180

  
181
///////////////////////////////////////////////////////////////////////////////////////////////////
182

  
183
    public int openGlVersion()
184
      {
185
      Context context = mView.getContext();
186
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
187
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
188
      int glESversion = configurationInfo.reqGlEsVersion;
189
      int major = glESversion >> 16;
190
      int minor = glESversion & 0xff;
191

  
192
      return 100*major + 10*minor;
193
      }
194

  
195 181
///////////////////////////////////////////////////////////////////////////////////////////////////
196 182

  
197 183
    public InputStream localFile(int fileID)

Also available in: Unified diff