Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/singlemesh/SingleMeshRenderer.java | ||
---|---|---|
379 | 379 |
android.util.Log.e("SingleMesh", ex.getMessage() ); |
380 | 380 |
} |
381 | 381 |
|
382 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
383 |
|
|
384 |
public int openGlVersion() |
|
385 |
{ |
|
386 |
Context context = mView.getContext(); |
|
387 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
388 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
389 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
390 |
int major = glESversion >> 16; |
|
391 |
int minor = glESversion & 0xff; |
|
392 |
|
|
393 |
return 100*major + 10*minor; |
|
394 |
} |
|
395 |
|
|
396 | 382 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
397 | 383 |
|
398 | 384 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.