diff options
author | Sven Gothel <[email protected]> | 2008-11-13 20:17:11 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-11-13 20:17:11 +0000 |
commit | 2b0a17abd7621483e746ac3cbcf452ec2938ca85 (patch) | |
tree | 6d34ff0b381d0461b07288252e6faf58349c41cf /src/java/com/sun | |
parent | 3cbb77e3407b0409b21da0bfc977b9c2f5eefe8e (diff) |
- Adding KHR extension suffix
- Adding EGLExt in BuildStaticGLInfo,
even though I have removed the StaticGLInfo usage in JOGL2
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@115 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun')
-rw-r--r-- | src/java/com/sun/gluegen/opengl/BuildStaticGLInfo.java | 16 | ||||
-rw-r--r-- | src/java/com/sun/gluegen/runtime/opengl/GLExtensionNames.java | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/java/com/sun/gluegen/opengl/BuildStaticGLInfo.java b/src/java/com/sun/gluegen/opengl/BuildStaticGLInfo.java index 52b9fde..13660b9 100644 --- a/src/java/com/sun/gluegen/opengl/BuildStaticGLInfo.java +++ b/src/java/com/sun/gluegen/opengl/BuildStaticGLInfo.java @@ -92,11 +92,11 @@ public class BuildStaticGLInfo { // Handles function pointer protected static Pattern funcPattern = - Pattern.compile("^(GLAPI|extern)?(\\s*)(\\w+)(\\*)?(\\s+)(GLAPIENTRY|APIENTRY|WINAPI)?(\\s*)([w]?gl\\w+)\\s?(\\(.*)"); + Pattern.compile("^(EGLAPI|GLAPI|extern)?(\\s*)(\\w+)(\\*)?(\\s+)(EGLAPIENTRY|GLAPIENTRY|APIENTRY|WINAPI)?(\\s*)([ew]?gl\\w+)\\s?(\\(.*)"); protected static Pattern associationPattern = - Pattern.compile("\\#ifndef ([W]?GL[X]?_[A-Za-z0-9_]+)"); + Pattern.compile("\\#ifndef ([EW]?GL[X]?_[A-Za-z0-9_]+)"); protected static Pattern definePattern = - Pattern.compile("\\#define ([W]?GL[X]?_[A-Za-z0-9_]+)\\s*([A-Za-z0-9_]+)"); + Pattern.compile("\\#define ([EW]?GL[X]?_[A-Za-z0-9_]+)\\s*([A-Za-z0-9_]+)"); // Maps function / #define names to the names of the extensions they're declared in protected Map declarationToExtensionMap = new HashMap(); // Maps extension names to Set of identifiers (both #defines and @@ -256,7 +256,15 @@ public class BuildStaticGLInfo output.println(" */"); output.println(" public static String getFunctionAssociation(String glFunctionName)"); output.println(" {"); - output.println(" return (String)funcToAssocMap.get(glFunctionName);"); + output.println(" String mappedName = null;"); + output.println(" int funcNamePermNum = com.sun.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutationNumber(glFunctionName);"); + output.println(" for(int i = 0; null==mappedName && i < funcNamePermNum; i++) {"); + output.println(" String tmp = com.sun.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutation(glFunctionName, i);"); + output.println(" try {"); + output.println(" mappedName = (String)funcToAssocMap.get(tmp);"); + output.println(" } catch (Exception e) { }"); + output.println(" }"); + output.println(" return mappedName;"); output.println(" }"); output.println(); diff --git a/src/java/com/sun/gluegen/runtime/opengl/GLExtensionNames.java b/src/java/com/sun/gluegen/runtime/opengl/GLExtensionNames.java index bd9ffaf..5182e9d 100644 --- a/src/java/com/sun/gluegen/runtime/opengl/GLExtensionNames.java +++ b/src/java/com/sun/gluegen/runtime/opengl/GLExtensionNames.java @@ -49,7 +49,7 @@ public class GLExtensionNames { // if exist as an ARB extension with the same value. // Pass-3 Emit - public static final String[] extensionsARB = { "ARB", "GL2", "OES", "OML" }; + public static final String[] extensionsARB = { "ARB", "GL2", "OES", "KHR", "OML" }; public static final String[] extensionsVEN = { "3DFX", "AMD", "APPLE", |