summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-05 22:40:34 +0000
committerSven Gothel <[email protected]>2008-07-05 22:40:34 +0000
commit649888422631e3bec8fa0f60afa99bc690992d71 (patch)
treefab9103d5ccecca52923bb7bd9e7b0e551631346
parent9e5d4716a654e425f0ca5a3f676797e1ffb263ad (diff)
Fixed fine javadoc entries for aliased/unified GL functions
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@95 a78bb65f-1512-4460-ba86-f6dc96a7bf27
-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;
}