Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/catanddog/CatAndDogRenderer.java | ||
---|---|---|
175 | 175 |
android.util.Log.e("CatAndDog", ex.getMessage() ); |
176 | 176 |
} |
177 | 177 |
|
178 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
179 |
|
|
180 |
public int openGlVersion() |
|
181 |
{ |
|
182 |
Context context = mView.getContext(); |
|
183 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
184 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
185 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
186 |
int major = glESversion >> 16; |
|
187 |
int minor = glESversion & 0xff; |
|
188 |
|
|
189 |
return 100*major + 10*minor; |
|
190 |
} |
|
191 |
|
|
192 | 178 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
193 | 179 |
|
194 | 180 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.