summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/com/sun/gluegen/opengl/GLEmitter.java19
-rw-r--r--src/java/com/sun/gluegen/runtime/opengl/GLUnifiedName.java9
2 files changed, 13 insertions, 15 deletions
diff --git a/src/java/com/sun/gluegen/opengl/GLEmitter.java b/src/java/com/sun/gluegen/opengl/GLEmitter.java
index 27a77fc..b9c4349 100644
--- a/src/java/com/sun/gluegen/opengl/GLEmitter.java
+++ b/src/java/com/sun/gluegen/opengl/GLEmitter.java
@@ -332,17 +332,16 @@ public class GLEmitter extends ProcAddressEmitter
protected void validateFunctionsToBind(Set/*FunctionSymbol*/ funcsSet) {
ArrayList newUniFuncs = new ArrayList();
+ HashSet origFuncNames = new HashSet();
for (Iterator iter = funcsSet.iterator(); iter.hasNext(); ) {
FunctionSymbol fsOrig = (FunctionSymbol) iter.next();
+ origFuncNames.add(fsOrig.getName());
GLUnifiedName uniName = new GLUnifiedName(fsOrig.getName());
if (GLEmitter.shouldIgnore(uniName, (GLConfiguration)cfg)) {
iter.remove(); // remove ignored function
} else {
if( uniName.isExtensionARB() &&
!((GLConfiguration)cfg).skipProcAddressGen(fsOrig.getName()) ) {
- if(!funcNameMap.containsKey(uniName.getUni())) {
- funcNameMap.put(uniName.getUni(), uniName);
- }
FunctionSymbol fsUni = new FunctionSymbol(uniName.getUni(), fsOrig.getType());
if(!funcsSet.contains(fsUni)) {
newUniFuncs.add(fsUni); // add new uni name
@@ -350,10 +349,14 @@ public class GLEmitter extends ProcAddressEmitter
"\n\tARB: "+fsOrig+
"\n\tUNI: "+fsUni);
} else {
+ uniName.addOrig(uniName.getUni()); // the original name w/o extension
System.err.println("INFO: Dub ARB Normalized Function:"+
"\n\tARB: "+fsOrig+
"\n\tDUB: "+fsUni);
}
+ if(!funcNameMap.containsKey(uniName.getUni())) {
+ funcNameMap.put(uniName.getUni(), uniName);
+ }
iter.remove(); // remove ARB function
// make the function being dynamical fetched, due to it's dynamic naming scheme
((GLConfiguration)cfg).addForceProcAddressGen(uniName.getUni());
@@ -374,10 +377,14 @@ public class GLEmitter extends ProcAddressEmitter
FunctionSymbol fsUni = new FunctionSymbol(uniName.getUni(), fsOrig.getType());
if(funcsSet.contains(fsUni)) {
GLUnifiedName uniNameMap = (GLUnifiedName) funcNameMap.get(uniName.getUni());
- if(null!=uniNameMap) {
- uniNameMap.addOrig(fsOrig.getName());
- } else {
+ if(null==uniNameMap) {
funcNameMap.put(uniName.getUni(), uniName);
+ uniNameMap=uniName;
+ } else {
+ uniNameMap.addOrig(fsOrig.getName()); // add the VEN extension name
+ }
+ if(origFuncNames.contains(uniName.getUni())) {
+ uniNameMap.addOrig(uniName.getUni()); // the original name w/o extension
}
iter.remove(); // remove VEN function (already incl. as ARB)
System.err.println("INFO: Dub VEN Function:"+
diff --git a/src/java/com/sun/gluegen/runtime/opengl/GLUnifiedName.java b/src/java/com/sun/gluegen/runtime/opengl/GLUnifiedName.java
index 89d40e3..403e388 100644
--- a/src/java/com/sun/gluegen/runtime/opengl/GLUnifiedName.java
+++ b/src/java/com/sun/gluegen/runtime/opengl/GLUnifiedName.java
@@ -57,10 +57,6 @@ public class GLUnifiedName implements Cloneable {
if(str.endsWith(extensions[i])) {
return true;
}
- /*
- if(str.startsWith("GL_"+extensions[i]+"_")) {
- return true;
- } */
}
return false;
}
@@ -77,11 +73,6 @@ public class GLUnifiedName implements Cloneable {
str = str.substring(0, str.length()-extensions[i].length());
touched=true;
}
- /*
- if(str.startsWith("GL_"+extensions[i]+"_")) {
- str = "GL_"+str.substring(4+extensions[i].length());
- touched=true;
- } */
}
return str;
}