add some missing parameter validation in GLES java bindings
- added support for comments in checks.spec
- added most missing checks
- added and commented with // special-cased functions
- added and commented with # functions that are still missing validation checks
- moved glGet* to a special case and updated all the "pnames" from the khronos spec
- changed ifcheck to default to 1 value. this allows us to simplify the checks.spec file
and handle unknown pnames automatically (they'll be validated against 1 value, if
it happens to need more, the call will go through but the validation will not
happen).
- refactored the cpp headers in to a common header + GLES version specific
header
Bug: 7402895
Change-Id: Ib5c68ca0ca416407b4cfa36e3a21901b2d6263ab
diff --git a/opengl/tools/glgen/src/GenerateGLES.java b/opengl/tools/glgen/src/GenerateGLES.java
index 6468957..6f9da5d 100644
--- a/opengl/tools/glgen/src/GenerateGLES.java
+++ b/opengl/tools/glgen/src/GenerateGLES.java
@@ -42,7 +42,6 @@
}
CFunc cfunc = CFunc.parseCFunc(s);
-
String fname = cfunc.getName();
String stubRoot = "stubs/gles11/" + fname;
String javaPath = stubRoot + ".java";
@@ -96,10 +95,9 @@
new PrintStream(new FileOutputStream("out/" + gl11Filename));
PrintStream gl11cStream =
new PrintStream(new FileOutputStream("out/" + gl11cFilename));
- gl11Stream.println("/*");
- gl11cStream.println("/*");
copy("stubs/gles11/" + suffix + "Header.java-if", gl11Stream);
copy("stubs/gles11/" + suffix + "cHeader.cpp", gl11cStream);
+ copy("stubs/gles11/common.cpp", gl11cStream);
GLESCodeEmitter emitter = new GLESCodeEmitter(
"android/opengl/" + suffix,
checker, gl11Stream, gl11cStream);