diff options
author | Sven Gothel <[email protected]> | 2010-04-27 03:21:40 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-27 03:21:40 +0200 |
commit | f8fe770c3e32b8159476b2f02cd316288bae06b1 (patch) | |
tree | 908509b3f1b284b3cdcb2e10e32d7c87d70ce4a8 /src/java/com/jogamp/gluegen/runtime/opengl | |
parent | 4f144f4e8db7b75225d9182359365d50fcc3fbc3 (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/com/jogamp/gluegen/runtime/opengl')
-rw-r--r-- | src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java | 16 |
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 ebe4d2685..914e52792 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; } } |