summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/gl-impl-x11.cfg9
-rw-r--r--make/host.properties4
-rw-r--r--src/net/java/games/gluegen/opengl/GLEmitter.java16
3 files changed, 21 insertions, 8 deletions
diff --git a/make/gl-impl-x11.cfg b/make/gl-impl-x11.cfg
index 1468fab2a..e94923c64 100644
--- a/make/gl-impl-x11.cfg
+++ b/make/gl-impl-x11.cfg
@@ -10,6 +10,7 @@ Include gl-glx-common.cfg
EmitProcAddressTable true
ProcAddressTableClassName GLProcAddressTable
+ContextVariableName _context
CustomCCode #include <inttypes.h>
CustomCCode #include <X11/Xlib.h>
@@ -32,20 +33,20 @@ CustomCCode typedef void* LPVOID;
CustomCCode typedef unsigned int* PUINT;
CustomJavaCode X11GLImpl public X11GLImpl(X11GLContext context) {
-CustomJavaCode X11GLImpl this.context = context;
+CustomJavaCode X11GLImpl this._context = context;
CustomJavaCode X11GLImpl }
CustomJavaCode X11GLImpl public boolean isFunctionAvailable(String glFunctionName)
CustomJavaCode X11GLImpl {
-CustomJavaCode X11GLImpl return context.isFunctionAvailable(glFunctionName);
+CustomJavaCode X11GLImpl return _context.isFunctionAvailable(glFunctionName);
CustomJavaCode X11GLImpl }
CustomJavaCode X11GLImpl public boolean isExtensionAvailable(String glExtensionName)
CustomJavaCode X11GLImpl {
-CustomJavaCode X11GLImpl return context.isExtensionAvailable(glExtensionName);
+CustomJavaCode X11GLImpl return _context.isExtensionAvailable(glExtensionName);
CustomJavaCode X11GLImpl }
-CustomJavaCode X11GLImpl private X11GLContext context;
+CustomJavaCode X11GLImpl private X11GLContext _context;
CustomJavaCode X11GLImpl /**
CustomJavaCode X11GLImpl * Provides platform-independent access to the wglAllocateMemoryNV /
diff --git a/make/host.properties b/make/host.properties
index 01e90955d..0dea67346 100644
--- a/make/host.properties
+++ b/make/host.properties
@@ -16,9 +16,9 @@
# including the name of the jar
#
# Windows
-antlr.jar=C:/Users/kbr/ANTLR/antlr-2.7.2/antlr.jar
+# antlr.jar=C:/Users/kbr/ANTLR/antlr-2.7.2/antlr.jar
# Linux
-# antlr.jar=/home/kbr/ANTLR/antlr-2.7.2/antlr.jar
+antlr.jar=/home/kbr/antlr-2.7.2/antlr.jar
# Mac OS X
# antlr.jar=/Users/kbr/antlr-2.7.2/antlr.jar
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
}