Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
441 | 441 |
android.util.Log.e("StarWars", ex.getMessage() ); |
442 | 442 |
} |
443 | 443 |
|
444 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
445 |
|
|
446 |
public int openGlVersion() |
|
447 |
{ |
|
448 |
Context context = mView.getContext(); |
|
449 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
450 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
451 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
452 |
int major = glESversion >> 16; |
|
453 |
int minor = glESversion & 0xff; |
|
454 |
|
|
455 |
return 100*major + 10*minor; |
|
456 |
} |
|
457 |
|
|
458 | 444 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
459 | 445 |
|
460 | 446 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.