diff options
author | Sven Gothel <[email protected]> | 2008-11-14 07:04:59 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-11-14 07:04:59 +0000 |
commit | 0749b42efef3fd5c061b2a94ca7ab635daa555e4 (patch) | |
tree | 469ed9bfb850565c53bcfe7f1797515ad0e64436 | |
parent | 774cd9d1685bd3f4dbb19ed06b57c6d11f118e1e (diff) |
Added function name aliasing for 'isFunctionAvailable' dyn lookup case
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1788 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLContextImpl.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java index 20fc6916c..5314b10c3 100644 --- a/src/classes/com/sun/opengl/impl/GLContextImpl.java +++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java @@ -350,9 +350,18 @@ public abstract class GLContextImpl extends GLContext { } } catch (Exception e) {} } - // dynamic function lookup at last (not cached) + // dynamic function lookup at last incl name aliasing (not cached) GLDrawableFactoryImpl factoryImpl = (GLDrawableFactoryImpl)getGLDrawable().getFactory(); - if(0!=factoryImpl.dynamicLookupFunction(glFunctionName)) { + String tmpBase = com.sun.gluegen.runtime.opengl.GLExtensionNames.normalizeVEN(com.sun.gluegen.runtime.opengl.GLExtensionNames.normalizeARB(glFunctionName, true), true); + long addr = 0; + int variants = com.sun.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutationNumber(tmpBase); + for(int i = 0; 0==addr && i < variants; i++) { + String tmp = com.sun.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutation(tmpBase, i); + try { + addr = factoryImpl.dynamicLookupFunction(tmp); + } catch (Exception e) { } + } + if(0!=addr) { return true; } return false; |