Revision 625c67de
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/examples/rubik/RubikRenderer.java | ||
---|---|---|
164 | 164 |
|
165 | 165 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
166 | 166 |
|
167 |
public int openGlVersion() |
|
168 |
{ |
|
169 |
Context context = mView.getContext(); |
|
170 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
|
171 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
|
172 |
int glESversion = configurationInfo.reqGlEsVersion; |
|
173 |
int major = glESversion >> 16; |
|
174 |
int minor = glESversion & 0xff; |
|
175 |
|
|
176 |
return 100*major + 10*minor; |
|
177 |
} |
|
178 |
|
|
179 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
180 |
|
|
181 |
public InputStream localFile(int fileID) |
|
167 |
public InputStream localFile(int fileID) |
|
182 | 168 |
{ |
183 | 169 |
return mResources.openRawResource(fileID); |
184 | 170 |
} |
185 | 171 |
|
186 | 172 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
187 | 173 |
|
188 |
public void logMessage(String message) |
|
174 |
public void logMessage(String message)
|
|
189 | 175 |
{ |
190 | 176 |
android.util.Log.e("Rubik", message ); |
191 | 177 |
} |
Also available in: Unified diff
Decouple (to a large degree) the OpenGL Library from Android.