Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/dynamic/DynamicRenderer.java | ||
---|---|---|
127 | 127 |
android.util.Log.e("Dynamic", ex.getMessage() ); |
128 | 128 |
} |
129 | 129 |
|
130 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
131 |
|
|
132 |
public int openGlVersion() |
|
133 |
{ |
|
134 |
Context context = mView.getContext(); |
|
135 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
136 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
137 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
138 |
int major = glESversion >> 16; |
|
139 |
int minor = glESversion & 0xff; |
|
140 |
|
|
141 |
return 100*major + 10*minor; |
|
142 |
} |
|
143 |
|
|
144 | 130 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
145 | 131 |
|
146 | 132 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.