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