From 77b3e23485e3d53febd07c2d6dfcf2ade111ba63 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 5 Aug 2009 07:31:49 -0700 Subject: Cleanup for a better OpenGL 3.2 integration, for subsuming extensions: - Allow RenameExtensionIntoCore generate duplicate names, ie those will not be generated. - Add proper comment showing the extension of the symbol. - Fail if no 'GLHeader' is specified, but we are processing a GL/ProcAddress config - Fail if a GL function is not part of an extension MethodBinding, ConstantDefinition cleanup: - getName() returns the renamed name - getOrigName() returns the original - getAliasedNames() returns the aliased ones MethodBinding: - Change: equals() operates on renamed name - Add: hashCode() function - same criteria as equals() Impact: - All config options etc shall trigger with the renamed name, but ignore, rename etc. - Generated Java impl. uses the renamed base name as well Change: emitDefine() uses the ConstantDefinition Add: JavaConfiguration: dumpRenames() Change JavaConfiguration.shouldIgnoreInInterface/Impl(): - respect the renamed symbol name as well Change JavaEmitter.emitFunctions(): - only emit a generated MethodBinding once, therefor store emitted method bindings in a HashSet Fix BuildStaticGLInfo: - Allow white space at the end of #ifndef and #define - Trim strings - Allow 'const' qualifier in function pattern Fix GLEmitter: - Fail if no 'GLHeader' is specified, but a RenameIntoCore option .. - Don't emit marker defines, marking an extension (ie not part of an extension) Fix GLJavaMethodBindingEmitter: - Fail if a GL function is not part of an extension Fix PCPP: - Pass constant type qualifiers for hex-constants: 'l' 'L' ... Fix ProcAddressEmitter: - Operate on the aliased/renamed name for querying ProcAddress usage and generating code. --- src/java/com/sun/gluegen/nativesig/NativeSignatureEmitter.java | 4 ++-- .../gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/com/sun/gluegen/nativesig/NativeSignatureEmitter.java b/src/java/com/sun/gluegen/nativesig/NativeSignatureEmitter.java index 4fe81afbb..314a9bb79 100755 --- a/src/java/com/sun/gluegen/nativesig/NativeSignatureEmitter.java +++ b/src/java/com/sun/gluegen/nativesig/NativeSignatureEmitter.java @@ -50,9 +50,9 @@ import com.sun.gluegen.procaddress.*; /** Emitter producing NativeSignature attributes. */ public class NativeSignatureEmitter extends GLEmitter { - protected List generateMethodBindingEmitters(FunctionSymbol sym) throws Exception { + protected List generateMethodBindingEmitters(HashSet/**/ methodBindingSet, FunctionSymbol sym) throws Exception { // Allow superclass to do most of the work for us - List res = super.generateMethodBindingEmitters(sym); + List res = super.generateMethodBindingEmitters(methodBindingSet, sym); // Filter out all non-JavaMethodBindingEmitters for (Iterator iter = res.iterator(); iter.hasNext(); ) { diff --git a/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java index 12a6c0e4c..63d95fe51 100755 --- a/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java +++ b/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java @@ -474,9 +474,9 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding protected String getImplMethodName(boolean direct) { String name = null; if (direct) { - name = binding.getRenamedMethodName() + "$0"; + name = binding.getName() + "$0"; } else { - name = binding.getRenamedMethodName() + "$1"; + name = binding.getName() + "$1"; } if (bufferObjectVariant) { return name + "BufObj"; -- cgit v1.2.3