From 521aa631dcc6328a7ac31e51c457ff7115096358 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 22 Jan 2014 12:28:46 -0500 Subject: [PATCH] [Android] Parse integer ranges in the GLES3 info tab. The info we retrieve will only ever have 2 elements given back to us. --- .../dolphinemu/dolphinemu/about/GLES3InfoFragment.java | 6 +++--- .../src/org/dolphinemu/dolphinemu/about/Limit.java | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/about/GLES3InfoFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/about/GLES3InfoFragment.java index 3bf6e8a3cd..797a047b14 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/about/GLES3InfoFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/about/GLES3InfoFragment.java @@ -36,10 +36,10 @@ public final class GLES3InfoFragment extends ListFragment new Limit("Renderer", GLES30.GL_RENDERER, Type.STRING), new Limit("GLSL version", GLES30.GL_SHADING_LANGUAGE_VERSION, Type.STRING), // GLES 2.0 Limits - //new Limit("Aliased Point Size", GLES20.GL_ALIASED_POINT_SIZE_RANGE, Type.INTEGER_RANGE), - //new Limit("Aliased Line Width ", GLES20.GL_ALIASED_LINE_WIDTH_RANGE, Type.INTEGER_RANGE), + new Limit("Aliased Point Size", GLES30.GL_ALIASED_POINT_SIZE_RANGE, Type.INTEGER_RANGE), + new Limit("Aliased Line Width ", GLES30.GL_ALIASED_LINE_WIDTH_RANGE, Type.INTEGER_RANGE), new Limit("Max Texture Size", GLES30.GL_MAX_TEXTURE_SIZE, Type.INTEGER), - //new Limit("Viewport Dimensions", GLES20.GL_MAX_VIEWPORT_DIMS, Type.INTEGER_RANGE), + new Limit("Viewport Dimensions", GLES30.GL_MAX_VIEWPORT_DIMS, Type.INTEGER_RANGE), new Limit("Subpixel Bits", GLES30.GL_SUBPIXEL_BITS, Type.INTEGER), new Limit("Max Vertex Attributes", GLES30.GL_MAX_VERTEX_ATTRIBS, Type.INTEGER), new Limit("Max Vertex Uniform Vectors", GLES30.GL_MAX_VERTEX_UNIFORM_VECTORS, Type.INTEGER), diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/about/Limit.java b/Source/Android/src/org/dolphinemu/dolphinemu/about/Limit.java index 70b1be5b06..96b206b837 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/about/Limit.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/about/Limit.java @@ -48,9 +48,18 @@ final class Limit public String GetValue(EGLHelper context) { if (type == Type.INTEGER) + { return Integer.toString(context.glGetInteger(glEnum)); + } + else if (type == Type.INTEGER_RANGE) + { + int[] data = new int[2]; + context.getGL().glGetIntegerv(glEnum, data, 0); + return String.format("[%d, %d]", data[0], data[1]); + } + // If neither of the above type, assume it's a string. return context.glGetString(glEnum); } } \ No newline at end of file