summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen/src
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-03-29 15:20:45 -0700
committerJesse Hall <jessehall@google.com>2013-04-10 08:34:54 -0700
commit0eb6ad563825b97aec760a893db0eead10fe0ae6 (patch)
tree4316ae0eb03b0314301fa6841a0bf6a92df66a9a /opengl/tools/glgen/src
parent439bc1614dba5694cd10476c0238ddd1f77fc94e (diff)
downloadframeworks_native-0eb6ad563825b97aec760a893db0eead10fe0ae6.zip
frameworks_native-0eb6ad563825b97aec760a893db0eead10fe0ae6.tar.gz
frameworks_native-0eb6ad563825b97aec760a893db0eead10fe0ae6.tar.bz2
Support "const GLChar*" and "const GLenum*" types
Bug: 8566953 Change-Id: I349575e592e8b0d93d14237230b69bec4e04cf3e
Diffstat (limited to 'opengl/tools/glgen/src')
-rw-r--r--opengl/tools/glgen/src/CType.java3
-rw-r--r--opengl/tools/glgen/src/JType.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/opengl/tools/glgen/src/CType.java b/opengl/tools/glgen/src/CType.java
index 92950ea..aba98af 100644
--- a/opengl/tools/glgen/src/CType.java
+++ b/opengl/tools/glgen/src/CType.java
@@ -70,7 +70,8 @@ public class CType {
}
public boolean isConstCharPointer() {
- return isConst && isPointer && baseType.equals("char");
+ return isConst && isPointer &&
+ (baseType.equals("char") || baseType.equals("GLchar"));
}
public boolean isTypedPointer() {
diff --git a/opengl/tools/glgen/src/JType.java b/opengl/tools/glgen/src/JType.java
index 994e609..795d833 100644
--- a/opengl/tools/glgen/src/JType.java
+++ b/opengl/tools/glgen/src/JType.java
@@ -46,6 +46,7 @@ public class JType {
typeMapping.put(new CType("GLubyte", true, true), new JType("String", false, false));
typeMapping.put(new CType("char", false, true), new JType("byte"));
typeMapping.put(new CType("char", true, true), new JType("String", false, false));
+ typeMapping.put(new CType("GLchar", true, true), new JType("String", false, false));
typeMapping.put(new CType("int"), new JType("int"));
// EGL primitive types
@@ -80,6 +81,8 @@ public class JType {
new JType("java.nio.IntBuffer", true, false));
typeMapping.put(new CType("GLenum", false, true),
new JType("java.nio.IntBuffer", true, false));
+ typeMapping.put(new CType("GLenum", true, true),
+ new JType("java.nio.IntBuffer", true, false));
typeMapping.put(new CType("GLfixed", false, true),
new JType("java.nio.IntBuffer", true, false));
typeMapping.put(new CType("GLfixed", true, true),
@@ -107,6 +110,7 @@ public class JType {
arrayTypeMapping.put(new CType("GLboolean", false, true),
new JType("boolean", false, true));
arrayTypeMapping.put(new CType("GLenum", false, true), new JType("int", false, true));
+ arrayTypeMapping.put(new CType("GLenum", true, true), new JType("int", false, true));
arrayTypeMapping.put(new CType("GLfixed", true, true), new JType("int", false, true));
arrayTypeMapping.put(new CType("GLfixed", false, true), new JType("int", false, true));
arrayTypeMapping.put(new CType("GLfloat", false, true), new JType("float", false, true));