Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/mirror/MirrorRenderer.java | ||
---|---|---|
236 | 236 |
android.util.Log.e("Mirror", ex.getMessage() ); |
237 | 237 |
} |
238 | 238 |
|
239 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
240 |
|
|
241 |
public int openGlVersion() |
|
242 |
{ |
|
243 |
Context context = mView.getContext(); |
|
244 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
245 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
246 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
247 |
int major = glESversion >> 16; |
|
248 |
int minor = glESversion & 0xff; |
|
249 |
|
|
250 |
return 100*major + 10*minor; |
|
251 |
} |
|
252 |
|
|
253 | 239 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
254 | 240 |
|
255 | 241 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.