diff options
Diffstat (limited to 'src/java/com/jogamp/gluegen/runtime/Buffers.java')
-rwxr-xr-x | src/java/com/jogamp/gluegen/runtime/Buffers.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/runtime/Buffers.java b/src/java/com/jogamp/gluegen/runtime/Buffers.java index 843d8a6..96c9430 100755 --- a/src/java/com/jogamp/gluegen/runtime/Buffers.java +++ b/src/java/com/jogamp/gluegen/runtime/Buffers.java @@ -236,6 +236,8 @@ public class Buffers { return ((IntBuffer) buf).isDirect(); } else if (buf instanceof ShortBuffer) { return ((ShortBuffer) buf).isDirect(); + } else if (buf instanceof Int64Buffer) { + return ((Int64Buffer) buf).isDirect(); } else if (buf instanceof PointerBuffer) { return ((PointerBuffer) buf).isDirect(); } else if (Platform.isJavaSE()) { @@ -278,6 +280,9 @@ public class Buffers { return pos * SIZEOF_CHAR; } } + } else if (buf instanceof Int64Buffer) { + Int64Buffer int64Buffer = (Int64Buffer) buf; + return int64Buffer.position() * Int64Buffer.elementSize(); } else if (buf instanceof PointerBuffer) { PointerBuffer pointerBuffer = (PointerBuffer) buf; return pointerBuffer.position() * PointerBuffer.elementSize(); @@ -303,6 +308,8 @@ public class Buffers { return ((IntBuffer) buf).array(); } else if (buf instanceof ShortBuffer) { return ((ShortBuffer) buf).array(); + } else if (buf instanceof Int64Buffer) { + return ((Int64Buffer) buf).array(); } else if (buf instanceof PointerBuffer) { return ((PointerBuffer) buf).array(); }else if(Platform.isJavaSE()) { @@ -348,6 +355,9 @@ public class Buffers { return (SIZEOF_CHAR * (((CharBuffer) buf).arrayOffset() + pos)); } } + } else if (buf instanceof Int64Buffer) { + Int64Buffer int64Buffer = (Int64Buffer) buf; + return Int64Buffer.elementSize() * (int64Buffer.arrayOffset() + int64Buffer.position()); } else if (buf instanceof PointerBuffer) { PointerBuffer pointerBuffer = (PointerBuffer) buf; return PointerBuffer.elementSize() * (pointerBuffer.arrayOffset() + pointerBuffer.position()); @@ -656,6 +666,9 @@ public class Buffers { bytesRemaining = elementsRemaining * SIZEOF_CHAR; } } + } else if (buffer instanceof Int64Buffer) { + Int64Buffer int64Buffer = (Int64Buffer) buffer; + bytesRemaining = int64Buffer.remaining() * Int64Buffer.elementSize(); } else if (buffer instanceof PointerBuffer) { PointerBuffer pointerBuffer = (PointerBuffer) buffer; bytesRemaining = pointerBuffer.remaining() * PointerBuffer.elementSize(); |