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/projection/ProjectionRenderer.java
165 165
      android.util.Log.e("Projection", ex.getMessage() );
166 166
      }
167 167

  
168
///////////////////////////////////////////////////////////////////////////////////////////////////
169

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

  
179
      return 100*major + 10*minor;
180
      }
181

  
182 168
///////////////////////////////////////////////////////////////////////////////////////////////////
183 169

  
184 170
    public InputStream localFile(int fileID)

Also available in: Unified diff