diff options
author | Kenneth Russel <[email protected]> | 2005-02-26 01:41:28 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-02-26 01:41:28 +0000 |
commit | b41b720c4366d4e2cdc1ba146123b87da966d724 (patch) | |
tree | 6c6c8196e9ac0ef57f068f394c1720ec034639c2 /src/net/java/games/gluegen | |
parent | 2bb02ad536c5404f008ff71c6d4ca013abaff683 (diff) |
Merged with current JOGL trunk (tag JOGL_1_1_PRE_B10)
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@245 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen')
-rw-r--r-- | src/net/java/games/gluegen/FunctionEmitter.java | 9 | ||||
-rw-r--r-- | src/net/java/games/gluegen/GlueGen.java | 9 | ||||
-rw-r--r-- | src/net/java/games/gluegen/JavaEmitter.java | 24 | ||||
-rw-r--r-- | src/net/java/games/gluegen/JavaMethodBindingEmitter.java | 25 | ||||
-rw-r--r-- | src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java | 16 | ||||
-rw-r--r-- | src/net/java/games/gluegen/JavaType.java | 4 | ||||
-rw-r--r-- | src/net/java/games/gluegen/MethodBinding.java | 130 | ||||
-rw-r--r-- | src/net/java/games/gluegen/StructLayout.java | 6 | ||||
-rw-r--r-- | src/net/java/games/gluegen/opengl/GLEmitter.java | 55 | ||||
-rw-r--r-- | src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java | 1 |
10 files changed, 200 insertions, 79 deletions
diff --git a/src/net/java/games/gluegen/FunctionEmitter.java b/src/net/java/games/gluegen/FunctionEmitter.java index 097d8d0be..9acde1211 100644 --- a/src/net/java/games/gluegen/FunctionEmitter.java +++ b/src/net/java/games/gluegen/FunctionEmitter.java @@ -59,6 +59,15 @@ public abstract class FunctionEmitter this.defaultOutput = defaultOutput; } + /** + * Makes this FunctionEmitter a copy of the passed one. + */ + public FunctionEmitter(FunctionEmitter arg) { + modifiers = (HashSet) arg.modifiers.clone(); + commentEmitter = arg.commentEmitter; + defaultOutput = arg.defaultOutput; + } + public PrintWriter getDefaultOutput() { return defaultOutput; } public void addModifiers(Iterator/*<EmissionModifier>*/ mi) diff --git a/src/net/java/games/gluegen/GlueGen.java b/src/net/java/games/gluegen/GlueGen.java index 2e5f3421a..6c343a5ee 100644 --- a/src/net/java/games/gluegen/GlueGen.java +++ b/src/net/java/games/gluegen/GlueGen.java @@ -141,7 +141,14 @@ public class GlueGen implements GlueEmitterControls { } HeaderParser headerParser = new HeaderParser(); - MachineDescription machDesc = new MachineDescription32Bit(); + MachineDescription machDesc; + String os = System.getProperty("os.name").toLowerCase(); + String cpu = System.getProperty("os.arch").toLowerCase(); + if (os.startsWith("linux") && cpu.equals("amd64")) { + machDesc = new MachineDescription64Bit(); + } else { + machDesc = new MachineDescription32Bit(); + } headerParser.setMachineDescription(machDesc); TypeDictionary td = new TypeDictionary(); headerParser.setTypedefDictionary(td); diff --git a/src/net/java/games/gluegen/JavaEmitter.java b/src/net/java/games/gluegen/JavaEmitter.java index 00887c333..318c2ad73 100644 --- a/src/net/java/games/gluegen/JavaEmitter.java +++ b/src/net/java/games/gluegen/JavaEmitter.java @@ -264,10 +264,8 @@ public class JavaEmitter implements GlueEmitter { continue; // don't generate bindings for this symbol } - Iterator allBindings = generateMethodBindingEmitters(cFunc); - while (allBindings.hasNext()) { - methodBindingEmitters.add(allBindings.next()); - } + List allBindings = generateMethodBindingEmitters(cFunc); + methodBindingEmitters.addAll(allBindings); } // Emit all the methods @@ -305,7 +303,7 @@ public class JavaEmitter implements GlueEmitter { * Generate all appropriate Java bindings for the specified C function * symbols. */ - protected Iterator generateMethodBindingEmitters(FunctionSymbol sym) throws Exception { + protected List generateMethodBindingEmitters(FunctionSymbol sym) throws Exception { ArrayList/*<FunctionEmitter>*/ allEmitters = new ArrayList(1); @@ -375,7 +373,7 @@ public class JavaEmitter implements GlueEmitter { if (cfg.allStatic()) { entryPoint.addModifier(JavaMethodBindingEmitter.STATIC); } - if (!isUnimplemented && !binding.needsBody()) { + if (!isUnimplemented && !bindingNeedsBody(binding)) { entryPoint.addModifier(JavaMethodBindingEmitter.NATIVE); } entryPoint.setReturnedArrayLengthExpression(cfg.returnedArrayLength(binding.getName())); @@ -395,8 +393,8 @@ public class JavaEmitter implements GlueEmitter { // If the user has stated that the function will be // manually implemented, then don't auto-generate a function body. if (!cfg.manuallyImplement(sym.getName()) && !isUnimplemented) { - if (binding.needsBody()) { - // Generate the method which calls the underlying function + if (bindingNeedsBody(binding)) { + // Generate the method which calls the underlying C function // after unboxing has occurred PrintWriter output = cfg.allStatic() ? javaWriter() : javaImplWriter(); JavaMethodBindingEmitter wrappedEntryPoint = @@ -422,7 +420,7 @@ public class JavaEmitter implements GlueEmitter { "Error while generating bindings for \"" + sym + "\"", e); } - return allEmitters.iterator(); + return allEmitters; } @@ -571,7 +569,7 @@ public class JavaEmitter implements GlueEmitter { JavaMethodBindingEmitter entryPoint = new JavaMethodBindingImplEmitter(binding, writer, cfg.runtimeExceptionType()); entryPoint.addModifier(JavaMethodBindingEmitter.PUBLIC); - if (!binding.needsBody() && !binding.hasContainingType()) { + if (!bindingNeedsBody(binding) && !binding.hasContainingType()) { entryPoint.addModifier(JavaMethodBindingEmitter.NATIVE); } entryPoint.emit(); @@ -676,6 +674,12 @@ public class JavaEmitter implements GlueEmitter { // Internals only below this point // + protected boolean bindingNeedsBody(MethodBinding binding) { + // We need to perform NIO checks and conversions and array length + // checks + return binding.signatureUsesNIO() || binding.signatureUsesCArrays(); + } + private CMethodBindingEmitter makeCEmitter(MethodBinding binding, boolean overloaded, boolean doingImplRoutine, diff --git a/src/net/java/games/gluegen/JavaMethodBindingEmitter.java b/src/net/java/games/gluegen/JavaMethodBindingEmitter.java index 131faae0d..e5b83a26c 100644 --- a/src/net/java/games/gluegen/JavaMethodBindingEmitter.java +++ b/src/net/java/games/gluegen/JavaMethodBindingEmitter.java @@ -66,7 +66,7 @@ public class JavaMethodBindingEmitter extends FunctionEmitter private String runtimeExceptionType; private MethodBinding binding; - private boolean forNIOBufferBaseRoutine; + private boolean forImplementingMethodCall; // A non-null value indicates that rather than returning a compound // type accessor we are returning an array of such accessors; this @@ -80,18 +80,26 @@ public class JavaMethodBindingEmitter extends FunctionEmitter this(binding, output, runtimeExceptionType, false); } - public JavaMethodBindingEmitter(MethodBinding binding, PrintWriter output, String runtimeExceptionType, boolean forNIOBufferBaseRoutine) + public JavaMethodBindingEmitter(MethodBinding binding, PrintWriter output, String runtimeExceptionType, boolean forImplementingMethodCall) { super(output); this.binding = binding; - this.forNIOBufferBaseRoutine = forNIOBufferBaseRoutine; + this.forImplementingMethodCall = forImplementingMethodCall; this.runtimeExceptionType = runtimeExceptionType; setCommentEmitter(defaultInterfaceCommentEmitter); } + public JavaMethodBindingEmitter(JavaMethodBindingEmitter arg) { + super(arg); + runtimeExceptionType = arg.runtimeExceptionType; + binding = arg.binding; + forImplementingMethodCall = arg.forImplementingMethodCall; + returnedArrayLengthExpression = arg.returnedArrayLengthExpression; + } + public final MethodBinding getBinding() { return binding; } - public final boolean isForNIOBufferBaseRoutine() { return forNIOBufferBaseRoutine; } + public boolean isForImplementingMethodCall() { return forImplementingMethodCall; } public String getName() { return binding.getName(); @@ -130,9 +138,10 @@ public class JavaMethodBindingEmitter extends FunctionEmitter protected void emitName(PrintWriter writer) { - writer.print(binding.getName()); - if (forNIOBufferBaseRoutine) { - writer.print("0"); + if (forImplementingMethodCall) { + writer.print(getImplMethodName()); + } else { + writer.print(getName()); } } @@ -141,7 +150,7 @@ public class JavaMethodBindingEmitter extends FunctionEmitter boolean needComma = false; int numEmitted = 0; - if (forNIOBufferBaseRoutine && binding.hasContainingType()) { + if (forImplementingMethodCall && binding.hasContainingType()) { // Always emit outgoing "this" argument writer.print("java.nio.Buffer "); writer.print(javaThisArgumentName()); diff --git a/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java b/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java index 2701bc2ec..dc3dfa629 100644 --- a/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java +++ b/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java @@ -65,6 +65,13 @@ public class JavaMethodBindingImplEmitter extends JavaMethodBindingEmitter this.isUnimplemented = isUnimplemented; } + public JavaMethodBindingImplEmitter(JavaMethodBindingEmitter arg) { + super(arg); + if (arg instanceof JavaMethodBindingImplEmitter) { + this.isUnimplemented = ((JavaMethodBindingImplEmitter) arg).isUnimplemented; + } + } + protected void emitBody(PrintWriter writer) { MethodBinding binding = getBinding(); @@ -84,8 +91,15 @@ public class JavaMethodBindingImplEmitter extends JavaMethodBindingEmitter } } + protected boolean isUnimplemented() { + return isUnimplemented; + } + protected boolean needsBody() { - return isUnimplemented || getBinding().needsBody() || getBinding().hasContainingType(); + return (isUnimplemented || + getBinding().signatureUsesNIO() || + getBinding().signatureUsesCArrays() || + getBinding().hasContainingType()); } protected void emitPreCallSetup(MethodBinding binding, PrintWriter writer) { diff --git a/src/net/java/games/gluegen/JavaType.java b/src/net/java/games/gluegen/JavaType.java index 2d41a543d..b879187ef 100644 --- a/src/net/java/games/gluegen/JavaType.java +++ b/src/net/java/games/gluegen/JavaType.java @@ -325,6 +325,10 @@ public class JavaType { return ((clazz != null) && !isArray() && clazz.isPrimitive() && (clazz != Void.TYPE)); } + public boolean isPrimitiveArray() { + return (isArray() && (clazz.getComponentType().isPrimitive())); + } + public boolean isVoid() { return (clazz == Void.TYPE); } diff --git a/src/net/java/games/gluegen/MethodBinding.java b/src/net/java/games/gluegen/MethodBinding.java index fd2b7b7bc..b7117185d 100644 --- a/src/net/java/games/gluegen/MethodBinding.java +++ b/src/net/java/games/gluegen/MethodBinding.java @@ -52,8 +52,10 @@ public class MethodBinding { private FunctionSymbol sym; private JavaType javaReturnType; private List javaArgumentTypes; - private boolean computedNeedsBody; - private boolean needsBody; + private boolean computedSignatureProperties; + private boolean signatureUsesNIO; + private boolean signatureUsesCArrays; + private boolean signatureUsesPrimitiveArrays; private JavaType containingType; private Type containingCType; private int thisPointerIndex = -1; @@ -66,13 +68,15 @@ public class MethodBinding { public MethodBinding(MethodBinding bindingToCopy) { this.sym = bindingToCopy.sym; - this.containingType = bindingToCopy.containingType; - this.containingCType = bindingToCopy.containingCType; - this.javaReturnType = bindingToCopy.javaReturnType; - this.javaArgumentTypes = (List)((ArrayList)bindingToCopy.javaArgumentTypes).clone(); - this.computedNeedsBody = bindingToCopy.computedNeedsBody; - this.needsBody = bindingToCopy.needsBody; - this.thisPointerIndex = bindingToCopy.thisPointerIndex; + this.containingType = bindingToCopy.containingType; + this.containingCType = bindingToCopy.containingCType; + this.javaReturnType = bindingToCopy.javaReturnType; + this.javaArgumentTypes = (List)((ArrayList)bindingToCopy.javaArgumentTypes).clone(); + this.computedSignatureProperties = bindingToCopy.computedSignatureProperties; + this.signatureUsesNIO = bindingToCopy.signatureUsesNIO; + this.signatureUsesCArrays = bindingToCopy.signatureUsesCArrays; + this.signatureUsesPrimitiveArrays = bindingToCopy.signatureUsesPrimitiveArrays; + this.thisPointerIndex = bindingToCopy.thisPointerIndex; } /** Constructor for calling a C function. */ @@ -90,7 +94,7 @@ public class MethodBinding { public void setJavaReturnType(JavaType type) { javaReturnType = type; - computedNeedsBody = false; + computedSignatureProperties = false; } public void addJavaArgumentType(JavaType type) { @@ -98,7 +102,7 @@ public class MethodBinding { javaArgumentTypes = new ArrayList(); } javaArgumentTypes.add(type); - computedNeedsBody = false; + computedSignatureProperties = false; } public JavaType getJavaReturnType() { @@ -162,46 +166,86 @@ public class MethodBinding { } return binding; } + + /** + * Returns true if the return type or any of the outgoing arguments + * in the method's signature require conversion or checking due to + * the use of New I/O. + */ + public boolean signatureUsesNIO() { + computeSignatureProperties(); + return signatureUsesNIO; + } + + /** + * Returns true if any of the outgoing arguments in the method's + * signature represent fixed-length C arrays which require length + * checking during the call. + */ + public boolean signatureUsesCArrays() { + computeSignatureProperties(); + return signatureUsesCArrays; + } + + /** + * Returns true if any of the outgoing arguments in the method's + * signature represent primitive arrays which require a + * GetPrimitiveArrayCritical or similar operation during the call. + */ + public boolean signatureUsesPrimitiveArrays() { + computeSignatureProperties(); + return signatureUsesPrimitiveArrays; + } + /** - * Returns true if this method needs a special implementation to wrap and/or - * set the byte order of its arguments or return type (i.e., needs special - * pre-processing of the data passed to the native function, or - * post-processing of the data returned from the native function). <P> - * - * Returns false if this binding can be implemented via a one-to-one - * correspondence between a Java method and its native implementation. + * Computes summary information about the method's C and Java + * signatures. */ - public boolean needsBody() { - if (!computedNeedsBody) { - if (javaReturnType.isCompoundTypeWrapper() || - javaReturnType.isNIOByteBuffer() || - javaReturnType.isArrayOfCompoundTypeWrappers()) { - // Needs wrapping and/or setting of byte order (neither of - // which can be done easily from native code) - needsBody = true; - } else { - for (int i = 0; i < getNumArguments(); i++) { - JavaType javaArgType = getJavaArgumentType(i); - Type cArgType = getCArgumentType(i); - if (javaArgType.isCompoundTypeWrapper() || - javaArgType.isNIOBuffer() || - cArgType.isArray() || - javaArgType.isNIOBufferArray()) { - // Needs unwrapping of accessors, checking of array - // lengths, or checking of direct buffer property - needsBody = true; - break; - } - } + protected void computeSignatureProperties() { + if (computedSignatureProperties) + return; + + signatureUsesNIO = false; + signatureUsesCArrays = false; + signatureUsesPrimitiveArrays = false; + + if (javaReturnType.isCompoundTypeWrapper() || + javaReturnType.isNIOByteBuffer() || + javaReturnType.isArrayOfCompoundTypeWrappers()) { + // Needs wrapping and/or setting of byte order (neither of + // which can be done easily from native code) + signatureUsesNIO = true; + } + + for (int i = 0; i < getNumArguments(); i++) { + JavaType javaArgType = getJavaArgumentType(i); + Type cArgType = getCArgumentType(i); + if (javaArgType.isCompoundTypeWrapper() || + javaArgType.isNIOBuffer() || + javaArgType.isNIOBufferArray()) { + // Needs unwrapping of accessors or checking of direct + // buffer property + signatureUsesNIO = true; + } + + if (cArgType.isArray()) { + // Needs checking of array lengths + signatureUsesCArrays = true; + } + + if (javaArgType.isPrimitiveArray()) { + // Needs getPrimitiveArrayCritical or similar construct + // depending on native code calling convention + signatureUsesPrimitiveArrays = true; } - computedNeedsBody = true; } - return needsBody; + computedSignatureProperties = true; } + public MethodBinding createNIOBufferVariant() { - if (!needsBody()) { + if (!signatureUsesNIO()) { return this; } MethodBinding binding = new MethodBinding(sym, containingType, containingCType); diff --git a/src/net/java/games/gluegen/StructLayout.java b/src/net/java/games/gluegen/StructLayout.java index 4f5b76f1c..ebbace6b5 100644 --- a/src/net/java/games/gluegen/StructLayout.java +++ b/src/net/java/games/gluegen/StructLayout.java @@ -123,9 +123,11 @@ public class StructLayout { String cpu = System.getProperty("os.arch").toLowerCase(); if ((os.startsWith("windows") && cpu.equals("x86")) || (os.startsWith("linux") && cpu.equals("i386")) || + (os.startsWith("linux") && cpu.equals("amd64")) || (os.startsWith("sunos") && cpu.equals("sparc")) || - (os.startsWith("sunos") && cpu.equals("x86"))|| - (os.startsWith("mac os") && cpu.equals("ppc")) + (os.startsWith("sunos") && cpu.equals("x86")) || + (os.startsWith("mac os") && cpu.equals("ppc")) || + (os.startsWith("freebsd") && cpu.equals("i386")) ) { // FIXME: make struct alignment configurable? May need to change // packing rules on a per-type basis? diff --git a/src/net/java/games/gluegen/opengl/GLEmitter.java b/src/net/java/games/gluegen/opengl/GLEmitter.java index 861e85bb7..d30f145ab 100644 --- a/src/net/java/games/gluegen/opengl/GLEmitter.java +++ b/src/net/java/games/gluegen/opengl/GLEmitter.java @@ -93,14 +93,27 @@ public class GLEmitter extends JavaEmitter return new GLConfiguration(); } - protected Iterator generateMethodBindingEmitters(FunctionSymbol sym) throws Exception + protected List generateMethodBindingEmitters(FunctionSymbol sym) throws Exception { - Iterator defaultEmitters = super.generateMethodBindingEmitters(sym); + return generateMethodBindingEmittersImpl(sym); + } + + protected List generateMethodBindingEmitters(FunctionSymbol sym, boolean skipProcessing) throws Exception { + if (skipProcessing) { + return super.generateMethodBindingEmitters(sym); + } else { + return generateMethodBindingEmittersImpl(sym); + } + } + + private List generateMethodBindingEmittersImpl(FunctionSymbol sym) throws Exception + { + List defaultEmitters = super.generateMethodBindingEmitters(sym); // if the superclass didn't generate any bindings for the symbol, let's // honor that (for example, the superclass might have caught an Ignore // direction that matched the symbol's name). - if (!defaultEmitters.hasNext()) + if (defaultEmitters.isEmpty()) { return defaultEmitters; } @@ -121,9 +134,9 @@ public class GLEmitter extends JavaEmitter emitGLProcAddressTableEntryForSymbol(sym); } - while (defaultEmitters.hasNext()) + for (Iterator iter = defaultEmitters.iterator(); iter.hasNext(); ) { - FunctionEmitter emitter = (FunctionEmitter)defaultEmitters.next(); + FunctionEmitter emitter = (FunctionEmitter) iter.next(); if (emitter instanceof JavaMethodBindingEmitter) { JavaMethodBindingEmitter newEmitter = @@ -144,7 +157,7 @@ public class GLEmitter extends JavaEmitter } } - return modifiedEmitters.iterator(); + return modifiedEmitters; } /** @@ -168,7 +181,7 @@ public class GLEmitter extends JavaEmitter // Internals only below this point // - private JavaMethodBindingEmitter generateModifiedEmitter(JavaMethodBindingEmitter baseJavaEmitter) + protected JavaMethodBindingEmitter generateModifiedEmitter(JavaMethodBindingEmitter baseJavaEmitter) { if (!(baseJavaEmitter instanceof JavaMethodBindingImplEmitter)) { // We only want to wrap the native entry point in the implementation @@ -178,7 +191,7 @@ public class GLEmitter extends JavaEmitter // it needs argument conversion or similar, filter that out since we will // be providing such an emitter ourselves. Otherwise return the emitter // unmodified. - if (baseJavaEmitter.isForNIOBufferBaseRoutine()) + if (baseJavaEmitter.isForImplementingMethodCall()) return null; return baseJavaEmitter; } @@ -189,7 +202,7 @@ public class GLEmitter extends JavaEmitter return new JavaGLPAWrapperEmitter(baseJavaEmitter, getGLConfig().getProcAddressTableExpr()); } - private CMethodBindingEmitter generateModifiedEmitter(CMethodBindingEmitter baseCEmitter) + protected CMethodBindingEmitter generateModifiedEmitter(CMethodBindingEmitter baseCEmitter) { // The C-side JNI binding for this particular function will have an // extra final argument, which is the address (the OpenGL procedure @@ -202,7 +215,7 @@ public class GLEmitter extends JavaEmitter return res; } - private boolean needsProcAddressWrapper(FunctionSymbol sym) + protected boolean needsProcAddressWrapper(FunctionSymbol sym) { String symName = sym.getName(); @@ -275,6 +288,10 @@ public class GLEmitter extends JavaEmitter tableWriter.println("public class " + tableClassName); tableWriter.println("{"); numProcAddressEntries = 0; + + for (Iterator iter = getGLConfig().getForceProcAddressGen().iterator(); iter.hasNext(); ) { + emitGLProcAddressTableEntryForString((String) iter.next()); + } } private void endGLProcAddressTable() throws Exception @@ -316,16 +333,21 @@ public class GLEmitter extends JavaEmitter w.close(); } - private void emitGLProcAddressTableEntryForSymbol(FunctionSymbol cFunc) + protected void emitGLProcAddressTableEntryForSymbol(FunctionSymbol cFunc) + { + emitGLProcAddressTableEntryForString(cFunc.getName()); + } + + protected void emitGLProcAddressTableEntryForString(String str) { tableWriter.print(" public long "); tableWriter.print(PROCADDRESS_VAR_PREFIX); - tableWriter.print(cFunc.getName()); + tableWriter.print(str); tableWriter.println(";"); ++numProcAddressEntries; } - private GLConfiguration getGLConfig() { + protected GLConfiguration getGLConfig() { return (GLConfiguration) getConfig(); } @@ -335,6 +357,7 @@ public class GLEmitter extends JavaEmitter private String tableClassPackage; private String tableClassName = "ProcAddressTable"; private Set/*<String>*/ skipProcAddressGen = new HashSet(); + private List/*<String>*/ forceProcAddressGen = new ArrayList(); private String contextVariableName = "context"; private String defaultGetProcAddressTableExpr = ".getGLProcAddressTable()"; private String getProcAddressTableExpr; @@ -358,6 +381,11 @@ public class GLEmitter extends JavaEmitter String sym = readString("SkipProcAddressGen", tok, filename, lineNo); skipProcAddressGen.add(sym); } + else if (cmd.equalsIgnoreCase("ForceProcAddressGen")) + { + String sym = readString("ForceProcAddressGen", tok, filename, lineNo); + forceProcAddressGen.add(sym); + } else if (cmd.equalsIgnoreCase("ContextVariableName")) { contextVariableName = readString("ContextVariableName", tok, filename, lineNo); @@ -386,6 +414,7 @@ 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 List getForceProcAddressGen() { return forceProcAddressGen; } public String contextVariableName() { return contextVariableName; } public String getProcAddressTableExpr() { if (getProcAddressTableExpr == null) { diff --git a/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java b/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java index 4fb50ea21..1bb06b791 100644 --- a/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java +++ b/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java @@ -151,7 +151,6 @@ public class JavaGLPAWrapperEmitter extends JavaMethodBindingImplEmitter protected void emitPreCallSetup(MethodBinding binding, PrintWriter writer) { super.emitPreCallSetup(binding, writer); - JavaType returnType = binding.getJavaReturnType(); MethodBinding wrappedBinding = emitterBeingWrapped.getBinding(); String procAddressVariable = |