Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java | ||
---|---|---|
149 | 149 |
android.util.Log.e("Quaternion", ex.getMessage() ); |
150 | 150 |
} |
151 | 151 |
|
152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
153 |
|
|
154 |
public int openGlVersion() |
|
155 |
{ |
|
156 |
Context context = mView.getContext(); |
|
157 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
158 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
159 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
160 |
int major = glESversion >> 16; |
|
161 |
int minor = glESversion & 0xff; |
|
162 |
|
|
163 |
return 100*major + 10*minor; |
|
164 |
} |
|
165 |
|
|
166 | 152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
167 | 153 |
|
168 | 154 |
public InputStream localFile(int fileID) |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.