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/inflate/InflateRenderer.java
172 172
      android.util.Log.e("Inflate", ex.getMessage() );
173 173
      }
174 174

  
175
///////////////////////////////////////////////////////////////////////////////////////////////////
176

  
177
    public int openGlVersion()
178
      {
179
      Context context = mView.getContext();
180
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
181
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
182
      int glESversion = configurationInfo.reqGlEsVersion;
183
      int major = glESversion >> 16;
184
      int minor = glESversion & 0xff;
185

  
186
      return 100*major + 10*minor;
187
      }
188

  
189 175
///////////////////////////////////////////////////////////////////////////////////////////////////
190 176

  
191 177
    public InputStream localFile(int fileID)

Also available in: Unified diff