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/sink/SinkRenderer.java
152 152
    android.util.Log.e("Sink", ex.getMessage() );
153 153
    }
154 154

  
155
///////////////////////////////////////////////////////////////////////////////////////////////////
156

  
157
  public int openGlVersion()
158
    {
159
    Context context = mView.getContext();
160
    final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
161
    final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
162
    int glESversion = configurationInfo.reqGlEsVersion;
163
    int major = glESversion >> 16;
164
    int minor = glESversion & 0xff;
165

  
166
    return 100*major + 10*minor;
167
    }
168

  
169 155
///////////////////////////////////////////////////////////////////////////////////////////////////
170 156

  
171 157
  public InputStream localFile(int fileID)

Also available in: Unified diff