diff options
author | Kenneth Russel <[email protected]> | 2003-07-15 15:25:43 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2003-07-15 15:25:43 +0000 |
commit | 51e246743458b40ebed92ffaebf2f07483becb51 (patch) | |
tree | 81124790d879ea68e6e4dc50880cf0254f520ff7 /src/net/java/games/gluegen | |
parent | 68e29a425b63f1eca8e6879ebfb3324929b3dc2a (diff) |
Added ContextVariableName configuration option to GLEmitter because of
namespace conflicts with some argument names on X11.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@33 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen')
-rw-r--r-- | src/net/java/games/gluegen/opengl/GLEmitter.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/net/java/games/gluegen/opengl/GLEmitter.java b/src/net/java/games/gluegen/opengl/GLEmitter.java index 5fb032124..0e64931ba 100644 --- a/src/net/java/games/gluegen/opengl/GLEmitter.java +++ b/src/net/java/games/gluegen/opengl/GLEmitter.java @@ -336,7 +336,9 @@ public class GLEmitter extends JavaEmitter private String tableClassPackage; private String tableClassName = "ProcAddressTable"; private Set/*<String>*/ skipProcAddressGen = new HashSet(); - private String getProcAddressTableExpr = "context.getGLProcAddressTable()"; + private String contextVariableName = "context"; + private String defaultGetProcAddressTableExpr = ".getGLProcAddressTable()"; + private String getProcAddressTableExpr; protected void dispatch(String cmd, StringTokenizer tok, File file, String filename, int lineNo) throws IOException { if (cmd.equalsIgnoreCase("EmitProcAddressTable")) @@ -357,6 +359,10 @@ public class GLEmitter extends JavaEmitter String sym = readString("SkipProcAddressGen", tok, filename, lineNo); skipProcAddressGen.add(sym); } + else if (cmd.equalsIgnoreCase("ContextVariableName")) + { + contextVariableName = readString("ContextVariableName", tok, filename, lineNo); + } else if (cmd.equalsIgnoreCase("GetProcAddressTableExpr")) { getProcAddressTableExpr = readGetProcAddressTableExpr(tok, filename, lineNo); @@ -381,7 +387,13 @@ public class GLEmitter extends JavaEmitter public String tableClassPackage() { return tableClassPackage; } public String tableClassName() { return tableClassName; } public boolean skipProcAddressGen (String name) { return skipProcAddressGen.contains(name); } - public String getProcAddressTableExpr() { return getProcAddressTableExpr; } + public String contextVariableName() { return contextVariableName; } + public String getProcAddressTableExpr() { + if (getProcAddressTableExpr == null) { + getProcAddressTableExpr = contextVariableName + defaultGetProcAddressTableExpr; + } + return getProcAddressTableExpr; + } } // end class GLConfiguration } |