Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/movingglow/MovingGlowRenderer.java | ||
---|---|---|
219 | 219 |
android.util.Log.e("MovingGlow", ex.getMessage() ); |
220 | 220 |
} |
221 | 221 |
|
222 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
223 |
|
|
224 |
public int openGlVersion() |
|
225 |
{ |
|
226 |
Context context = mView.getContext(); |
|
227 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
228 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
229 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
230 |
int major = glESversion >> 16; |
|
231 |
int minor = glESversion & 0xff; |
|
232 |
|
|
233 |
return 100*major + 10*minor; |
|
234 |
} |
|
235 |
|
|
236 | 222 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
237 | 223 |
|
238 | 224 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.