Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/listener/ListenerRenderer.java | ||
---|---|---|
191 | 191 |
android.util.Log.e("Listener", ex.getMessage() ); |
192 | 192 |
} |
193 | 193 |
|
194 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
195 |
|
|
196 |
public int openGlVersion() |
|
197 |
{ |
|
198 |
Context context = mView.getContext(); |
|
199 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
200 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
201 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
202 |
int major = glESversion >> 16; |
|
203 |
int minor = glESversion & 0xff; |
|
204 |
|
|
205 |
return 100*major + 10*minor; |
|
206 |
} |
|
207 |
|
|
208 | 194 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
209 | 195 |
|
210 | 196 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.