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/aroundtheworld/AroundTheWorldRenderer.java
163 163
      android.util.Log.e("AroundTheWorld", ex.getMessage() );
164 164
      }
165 165

  
166
///////////////////////////////////////////////////////////////////////////////////////////////////
167

  
168
    public int openGlVersion()
169
      {
170
      Context context = mView.getContext();
171
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
172
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
173
      int glESversion = configurationInfo.reqGlEsVersion;
174
      int major = glESversion >> 16;
175
      int minor = glESversion & 0xff;
176

  
177
      return 100*major + 10*minor;
178
      }
179

  
180 166
///////////////////////////////////////////////////////////////////////////////////////////////////
181 167

  
182 168
    public InputStream localFile(int fileID)

Also available in: Unified diff