I'm trying to find out the maximum texture size for the original Motorola Droid. I believe the G1 has a maximum texture size of 512, but it would be nice if there was a more official way I could find out so I can build a proper tile system.
2 Answers
You can request the max texture size using glGetIntegerv:
int[] maxTextureSize = new int[1];
gl.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxTextureSize, 0);
Log.i("glinfo", "Max texture size = " + maxTextureSize[0]);
-
5What is gl? GLES10? I tried to run it in onResume of my activity and it returns 0...– YarAug 27, 2013 at 18:36
-
7You should make reference to Android's OpenGL ES implementation (
android.opengl.GLES10); replace the second line with:GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, glInt, 0);Nov 13, 2013 at 18:25 -
-
4Note that the method returns 0 if there exists no OpenGL context. Adding android:hardwareAccelerated="true" to the application tag in the manifest may help, but I've noticed that this is no guarantee. Here[1] is an extensive answer that creates an OpenGL context before calling this method. [1]: stackoverflow.com/questions/26985858/…– MathijsApr 15, 2015 at 9:38
-
3
Also check out http://www.glbenchmark.com/ - it has an extensive database of OpenGL environment and performance details for mobile devices