aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-04-01 16:05:18 +0200
committerSven Gothel <[email protected]>2015-04-01 16:05:18 +0200
commitdc32ed4f045cbdfdc70fe8572564cd8e3b5eb33b (patch)
treebe9f8b178f7a5a5f446b59ad75cf490c7f8ce5e4 /src/jogl/classes/com
parent5deabf720f1101b39376cb211c39f6f0c3474153 (diff)
Bug 1153 - GLEmitter: Only dump extra comment if w/o enum-name or w/o extension
Since GlueGen handles enum typedef's properly, this relation to the enum-name is already printed.
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
index c0a527ad7..8df4a9488 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
@@ -377,18 +377,17 @@ public class GLEmitter extends ProcAddressEmitter {
public void emitDefine(final ConstantDefinition def, final String optionalComment) throws Exception {
final String symbolRenamed = def.getName();
final StringBuilder newComment = new StringBuilder();
- newComment.append("Part of ");
if (0 == addExtensionsOfSymbols2Doc(newComment, ", ", ", ", symbolRenamed)) {
if (def.isEnum()) {
final String enumName = def.getEnumName();
- if (null != enumName) {
- newComment.append(enumName);
- } else {
- newComment.append("CORE ENUM");
+ if (null == enumName) {
+ newComment.append("Part of CORE ");
+ newComment.append("ENUM");
}
} else {
if (getGLConfig().getAllowNonGLExtensions()) {
- newComment.append("CORE DEF");
+ newComment.append("Part of CORE ");
+ newComment.append("DEF");
} else {
// Note: All GL defines must be contained within an extension marker !
// #ifndef GL_EXT_lala
@@ -403,7 +402,9 @@ public class GLEmitter extends ProcAddressEmitter {
}
}
if (null != optionalComment) {
- newComment.append("<br>");
+ if( newComment.length() > 0 ) {
+ newComment.append("<br>");
+ }
newComment.append(optionalComment);
}