diff options
author | Sven Gothel <[email protected]> | 2008-07-05 22:01:47 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-07-05 22:01:47 +0000 |
commit | 9e5d4716a654e425f0ca5a3f676797e1ffb263ad (patch) | |
tree | 475d45059823ae6d9f2e6051f57258b07e3959c0 /src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java | |
parent | 204764628bbbd8228dcc2e735ac5ee6c21714295 (diff) |
Added fine javadoc entries for aliased/unified GL functions
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@94 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java')
-rwxr-xr-x | src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java index 8512f38..3983916 100755 --- a/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java +++ b/src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java @@ -44,6 +44,7 @@ import java.util.*; import com.sun.gluegen.*; import com.sun.gluegen.cgram.types.*; import com.sun.gluegen.procaddress.*; +import com.sun.gluegen.runtime.opengl.GLUnifiedName; /** A specialization of the proc address emitter which knows how to change argument names to take into account Vertex Buffer Object / @@ -51,6 +52,7 @@ import com.sun.gluegen.procaddress.*; public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmitter { protected boolean bufferObjectVariant; + protected GLEmitter glEmitter; public GLJavaMethodBindingEmitter(JavaMethodBindingEmitter methodToWrap, boolean callThroughProcAddress, @@ -64,16 +66,21 @@ public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmit changeNameAndArguments, emitter); this.bufferObjectVariant = bufferObjectVariant; + this.glEmitter=emitter; + setCommentEmitter(new WrappedMethodCommentEmitter()); } public GLJavaMethodBindingEmitter(ProcAddressJavaMethodBindingEmitter methodToWrap, + GLEmitter emitter, boolean bufferObjectVariant) { super(methodToWrap); this.bufferObjectVariant = bufferObjectVariant; + this.glEmitter=emitter; + setCommentEmitter(new WrappedMethodCommentEmitter()); } public GLJavaMethodBindingEmitter(GLJavaMethodBindingEmitter methodToWrap) { - this(methodToWrap, methodToWrap.bufferObjectVariant); + this(methodToWrap, methodToWrap.glEmitter, methodToWrap.bufferObjectVariant); } protected String getArgumentName(int i) { @@ -96,4 +103,23 @@ public class GLJavaMethodBindingEmitter extends ProcAddressJavaMethodBindingEmit return name; } + /** This class emits the comment for the wrapper method */ + public class WrappedMethodCommentEmitter extends ProcAddressJavaMethodBindingEmitter.WrappedMethodCommentEmitter { + protected void emitBindingCSignature(MethodBinding binding, PrintWriter writer) { + if(null!=glEmitter) { + GLUnifiedName uniName = (GLUnifiedName) glEmitter.getFuncNameMap().get(binding.getCSymbol().getName()); + if(null!=uniName) { + writer.print("- Alias for: <br> <code> "); + writer.print(binding.getCSymbol().getType().toString(uniName.getOrigStringList(", "), tagNativeBinding)); + writer.print(" </code> "); + return ; // done + } + } + writer.print(": <br> "); + super.emitBindingCSignature(binding, writer); + } + protected void emitBeginning(FunctionEmitter methodEmitter, PrintWriter writer) { + writer.print("Entry point (through function pointer) to C language function "); + } + } } |