diff options
author | Kenneth Russel <[email protected]> | 2008-05-26 18:35:33 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-05-26 18:35:33 +0000 |
commit | 040e730115f8a50b598edb448fc29f8917bde392 (patch) | |
tree | 9b2a78e5dc09d1c693a523355ad74242750e9eef /src/java/com/sun/gluegen/runtime | |
parent | c84a0811ac16ef8c25f257c1bcee4d386e7afcb9 (diff) |
Added support for passing outgoing arrays of compound types, including
non-const arrays of compound types and the associated copies back to
Java, in support of constructs like eglChooseConfig. Generated code
has been compiled but not yet tested. Refactorings to allow generated
glue code using StructAccessors to work on Java ME / CDC / FP +
JSR-239 NIO, as well as Java SE. Bug fix to ForceProcAddressGen.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@77 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/runtime')
-rwxr-xr-x | src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp | 7 | ||||
-rwxr-xr-x | src/java/com/sun/gluegen/runtime/BufferFactory.java.javase | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp index 16c1494..622cc37 100755 --- a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp +++ b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp @@ -52,6 +52,13 @@ public class BufferFactory { return buf; } + /** Helper routine to set a ByteBuffer to the native byte order, if + that operation is supported by the underlying NIO + implementation. */ + public static ByteBuffer nativeOrder(ByteBuffer buf) { + return buf; + } + /** Helper routine to tell whether a buffer is direct or not. Null pointers are considered direct. isDirect() should really be public in Buffer and not replicated in all subclasses. */ diff --git a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase index e7b7e52..a883316 100755 --- a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase +++ b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase @@ -56,6 +56,13 @@ public class BufferFactory { return buf; } + /** Helper routine to set a ByteBuffer to the native byte order, if + that operation is supported by the underlying NIO + implementation. */ + public static ByteBuffer nativeOrder(ByteBuffer buf) { + return buf.order(ByteOrder.nativeOrder()); + } + /** Helper routine to tell whether a buffer is direct or not. Null pointers are considered direct. isDirect() should really be public in Buffer and not replicated in all subclasses. */ |