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/wind/WindRenderer.java
182 182
      android.util.Log.e("Wind", ex.getMessage() );
183 183
      }
184 184

  
185
///////////////////////////////////////////////////////////////////////////////////////////////////
186

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

  
196
      return 100*major + 10*minor;
197
      }
198

  
199 185
///////////////////////////////////////////////////////////////////////////////////////////////////
200 186

  
201 187
    public InputStream localFile(int fileID)

Also available in: Unified diff