Added @Optional support for AL and GLES.

This commit is contained in:
Ioannis Tsakpinis 2011-10-12 17:58:04 +00:00
parent b09c6cf335
commit dd87468d6f
8 changed files with 40 additions and 34 deletions

View file

@ -125,7 +125,7 @@ public class RegisterStubsGenerator {
final Alternate alt_annotation = method.getAnnotation(Alternate.class);
final String methodName = alt_annotation == null ? method.getSimpleName() : alt_annotation.value();
String opengl_handle_name = methodName.replaceFirst("gl", platform.getPrefix());
writer.print(", \"" + opengl_handle_name + "\", (void *)&" + methodName + "}");
writer.print(", \"" + opengl_handle_name + "\", (void *)&" + methodName + ", " + (method.getAnnotation(Optional.class) == null ? "false" : "true") + "}");
if (has_more)
writer.println(",");
}