summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-27 03:21:40 +0200
committerSven Gothel <[email protected]>2010-04-27 03:21:40 +0200
commita9b91a40a88b305765b35c40c4a1d65b27980cfe (patch)
tree839f2ed2005151d050ea78df1a40341b0210755f /src/java
parent5cd7198759e07c986f6a19bd8f31fd7382749bfa (diff)
Fix GLProcAddressResolver regression: Loop through all names until found or n/a. Return 0 if not found, no Exception
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java b/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java
index ebe4d26..914e527 100644
--- a/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java
+++ b/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java
@@ -39,23 +39,23 @@ import com.jogamp.gluegen.runtime.FunctionAddressResolver;
*/
public class GLProcAddressResolver implements FunctionAddressResolver {
+ public static final boolean DEBUG = false;
public long resolve(String name, DynamicLookupHelper lookup) {
+ long newProcAddress = 0;
int permutations = GLExtensionNames.getFuncNamePermutationNumber(name);
- for (int i = 0; i < permutations; i++) {
+ for (int i = 0; 0 == newProcAddress && i < permutations; i++) {
String funcName = GLExtensionNames.getFuncNamePermutation(name, i);
try {
- return lookup.dynamicLookupFunction(funcName);
+ newProcAddress = lookup.dynamicLookupFunction(funcName);
} catch (Exception e) {
-// if (DEBUG) {
-// dout.println(e);
-// e.printStackTrace();
-// }
+ if (DEBUG) {
+ e.printStackTrace();
+ }
}
}
-
- throw new RuntimeException("unresolveable function name: "+name);
+ return newProcAddress;
}
}