summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-08-02 17:25:30 -0700
committerSven Gothel <[email protected]>2009-08-02 17:25:30 -0700
commit48465d43cf58d98758639f4064cc5eb3ee86bee8 (patch)
tree130f396f92328b66bba70fae5abf7bb828fc1331 /src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java
parentc83fc5cdcc615b4ee88ac2e0eb8737970fb2b8c3 (diff)
OpenGL: Add comment: Part of <extension>
Diffstat (limited to 'src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java')
-rwxr-xr-xsrc/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java
index c6a030935..b952272f3 100755
--- a/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java
@@ -52,6 +52,7 @@ import com.sun.gluegen.procaddress.*;
public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmitter {
protected boolean bufferObjectVariant;
protected GLEmitter glEmitter;
+ protected CommentEmitter glCommentEmitter = new GLCommentEmitter();
public GLJavaMethodBindingEmitter(JavaMethodBindingEmitter methodToWrap,
boolean callThroughProcAddress,
@@ -66,6 +67,7 @@ public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmit
emitter);
this.bufferObjectVariant = bufferObjectVariant;
this.glEmitter=emitter;
+ setCommentEmitter(glCommentEmitter);
}
public GLJavaMethodBindingEmitter(ProcAddressJavaMethodBindingEmitter methodToWrap,
@@ -74,6 +76,7 @@ public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmit
super(methodToWrap);
this.bufferObjectVariant = bufferObjectVariant;
this.glEmitter=emitter;
+ setCommentEmitter(glCommentEmitter);
}
public GLJavaMethodBindingEmitter(GLJavaMethodBindingEmitter methodToWrap) {
@@ -100,4 +103,18 @@ public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmit
return name;
}
+
+ protected class GLCommentEmitter
+ extends JavaMethodBindingEmitter.DefaultCommentEmitter
+ {
+ protected void emitBindingCSignature(MethodBinding binding, PrintWriter writer) {
+ super.emitBindingCSignature(binding, writer);
+ String extensionName = glEmitter.getGLConfig().getExtension(binding.getCSymbol().getName());
+ if(null!=extensionName) {
+ writer.print("<br>Part of <code>"+extensionName+"</code>");
+ } else {
+ writer.print("<br>Part of <code>unknown extension</code>");
+ }
+ }
+ }
}