diff options
author | Sven Gothel <[email protected]> | 2015-10-07 11:14:15 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-07 11:14:15 +0200 |
commit | 9c9577f2685053677b477365fb5ffa1cb2f53d03 (patch) | |
tree | 7cd6a254ff7451a18acea0f244c72ad97d5a2833 /src/jogl/classes/com | |
parent | 21a23e8d0256f38aaf6e054ec60bbbcae9ca1855 (diff) |
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part3: GLEmitter: Don't RenameExtensionIntoCore for IgnoredExtensions
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java | 8 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java | 44 |
2 files changed, 32 insertions, 20 deletions
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java index d6f72ee29..1c034ebfb 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java @@ -254,6 +254,14 @@ public class GLConfiguration extends ProcAddressConfiguration { super.logRenames(); } + protected boolean isIgnoredExtension(final String extensionName) { + if( ignoredExtensions.contains(extensionName) ) { + return !forcedExtensions.contains(extensionName); + } else { + return false; + } + } + protected boolean shouldIgnoreExtension(final AliasedSymbol symbol) { final Set<String> symExtensionNames; // collect current-name symbol extensions diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java index 8df4a9488..a68fc6b2a 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java @@ -112,31 +112,35 @@ public class GLEmitter extends ProcAddressEmitter { final Set<String> extensionSet = isSemHeader ? config.getExtensionsRenamedIntoCore() : glInfo.getExtensions(); for (final String extension : extensionSet) { - LOG.log(INFO, "<RenameExtensionIntoCore: {0} BEGIN {1}", extension, headerType); - final Set<String> declarations = glInfo.getDeclarations(extension); - if (declarations != null) { - for (final Iterator<String> iterator = declarations.iterator(); iterator.hasNext();) { - final String decl = iterator.next(); - final boolean isGLFunction = GLNameResolver.isGLFunction(decl); - boolean isGLEnumeration = false; - if (!isGLFunction) { - isGLEnumeration = GLNameResolver.isGLEnumeration(decl); - } - if (isGLFunction || isGLEnumeration) { - final String renamed = GLNameResolver.normalize(decl, isGLFunction); - if (!renamed.equals(decl)) { - if( isSemHeader ) { - // Sem + Doc - config.addJavaSymbolRename(decl, renamed); - } else { - // Doc only - config.addJavaDocSymbolRename(decl, renamed); + if( isSemHeader && config.isIgnoredExtension(extension) ) { + LOG.log(INFO, "<RenameExtensionIntoCore: {0} IGNORED {1}>", extension, headerType); + } else { + LOG.log(INFO, "<RenameExtensionIntoCore: {0} BEGIN {1}", extension, headerType); + final Set<String> declarations = glInfo.getDeclarations(extension); + if (declarations != null) { + for (final Iterator<String> iterator = declarations.iterator(); iterator.hasNext();) { + final String decl = iterator.next(); + final boolean isGLFunction = GLNameResolver.isGLFunction(decl); + boolean isGLEnumeration = false; + if (!isGLFunction) { + isGLEnumeration = GLNameResolver.isGLEnumeration(decl); + } + if (isGLFunction || isGLEnumeration) { + final String renamed = GLNameResolver.normalize(decl, isGLFunction); + if (!renamed.equals(decl)) { + if( isSemHeader ) { + // Sem + Doc + config.addJavaSymbolRename(decl, renamed); + } else { + // Doc only + config.addJavaDocSymbolRename(decl, renamed); + } } } } } + LOG.log(INFO, "RenameExtensionIntoCore: {0} END>", extension, headerType); } - LOG.log(INFO, "RenameExtensionIntoCore: {0} END>", extension, headerType); } } |