diff options
author | Kenneth Russel <[email protected]> | 2003-08-06 04:58:31 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2003-08-06 04:58:31 +0000 |
commit | 661fec76c5ccd030016d66675024ec604752ccda (patch) | |
tree | eeb61fdea2164d358809eed4d73b6654815c01d8 /make/gl-impl-CustomJavaCode.java | |
parent | d224c85aa7c2e420ffec62ce77f2ca02430f6c76 (diff) |
Changed behavior of ManuallyImplement to not emit GLEmitter's dispatch
routine, but to still emit entry in proc address table. Added first
implementation of glMapBufferARB; may need to reimplement due to
creation of finalizable direct ByteBuffer objects each time this
routine is called (which will be every frame).
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@45 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/gl-impl-CustomJavaCode.java')
-rw-r--r-- | make/gl-impl-CustomJavaCode.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/make/gl-impl-CustomJavaCode.java b/make/gl-impl-CustomJavaCode.java new file mode 100644 index 000000000..31bb91bc1 --- /dev/null +++ b/make/gl-impl-CustomJavaCode.java @@ -0,0 +1,16 @@ +/** Entry point to C language function: <br> <code> LPVOID glMapBufferARB(GLenum target, GLenum access); </code> */ +public java.nio.ByteBuffer glMapBufferARB(int target, int access) { + final long __addr_ = context.getGLProcAddressTable()._addressof_glMapBufferARB; + if (__addr_ == 0) { + throw new GLException("Method \"glMapBufferARB\" not available"); + } + int[] sz = new int[1]; + glGetBufferParameterivARB(target, GL_BUFFER_SIZE_ARB, sz); + ByteBuffer _res; + _res = dispatch_glMapBufferARB(target, access, sz[0], __addr_); + if (_res == null) return null; + return _res.order(ByteOrder.nativeOrder()); +} + +/** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBufferARB(GLenum target, GLenum access); </code> */ +native private java.nio.ByteBuffer dispatch_glMapBufferARB(int target, int access, int size, long glProcAddress); |