Bugzilla – Attachment 708 Details for
Bug 1180
Buffers.newDirectIntBuffer(int[]) does not set limit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gluegen-rewind-to-clear.patch
gluegen-rewind-to-clear.patch (text/plain), 3.32 KB, created by
Xerxes Rånby
on 2015-07-24 16:52:47 CEST
(
hide
)
Description:
gluegen-rewind-to-clear.patch
Filename:
MIME Type:
Creator:
Xerxes Rånby
Created:
2015-07-24 16:52:47 CEST
Size:
3.32 KB
patch
obsolete
>diff --git a/src/java/com/jogamp/common/nio/Buffers.java b/src/java/com/jogamp/common/nio/Buffers.java >index aae2be8..df0c164 100644 >--- a/src/java/com/jogamp/common/nio/Buffers.java >+++ b/src/java/com/jogamp/common/nio/Buffers.java >@@ -80,7 +80,7 @@ public class Buffers { > } > > public static ByteBuffer newDirectByteBuffer(final byte[] values, final int offset, final int length) { >- return (ByteBuffer)newDirectByteBuffer(length).put(values, offset, length).rewind(); >+ return (ByteBuffer)newDirectByteBuffer(length).put(values, offset, length).clear(); > } > > public static ByteBuffer newDirectByteBuffer(final byte[] values, final int offset) { >@@ -101,7 +101,7 @@ public class Buffers { > } > > public static DoubleBuffer newDirectDoubleBuffer(final double[] values, final int offset, final int length) { >- return (DoubleBuffer)newDirectDoubleBuffer(length).put(values, offset, length).rewind(); >+ return (DoubleBuffer)newDirectDoubleBuffer(length).put(values, offset, length).clear(); > } > > public static DoubleBuffer newDirectDoubleBuffer(final double[] values, final int offset) { >@@ -122,7 +122,7 @@ public class Buffers { > } > > public static FloatBuffer newDirectFloatBuffer(final float[] values, final int offset, final int length) { >- return (FloatBuffer)newDirectFloatBuffer(length).put(values, offset, length).rewind(); >+ return (FloatBuffer)newDirectFloatBuffer(length).put(values, offset, length).clear(); > } > > public static FloatBuffer newDirectFloatBuffer(final float[] values, final int offset) { >@@ -143,7 +143,7 @@ public class Buffers { > } > > public static IntBuffer newDirectIntBuffer(final int[] values, final int offset, final int length) { >- return (IntBuffer)newDirectIntBuffer(length).put(values, offset, length).rewind(); >+ return (IntBuffer)newDirectIntBuffer(length).put(values, offset, length).clear(); > } > > public static IntBuffer newDirectIntBuffer(final int[] values, final int offset) { >@@ -164,7 +164,7 @@ public class Buffers { > } > > public static LongBuffer newDirectLongBuffer(final long[] values, final int offset, final int length) { >- return (LongBuffer)newDirectLongBuffer(length).put(values, offset, length).rewind(); >+ return (LongBuffer)newDirectLongBuffer(length).put(values, offset, length).clear(); > } > > public static LongBuffer newDirectLongBuffer(final long[] values, final int offset) { >@@ -185,7 +185,7 @@ public class Buffers { > } > > public static ShortBuffer newDirectShortBuffer(final short[] values, final int offset, final int length) { >- return (ShortBuffer)newDirectShortBuffer(length).put(values, offset, length).rewind(); >+ return (ShortBuffer)newDirectShortBuffer(length).put(values, offset, length).clear(); > } > > public static ShortBuffer newDirectShortBuffer(final short[] values, final int offset) { >@@ -206,7 +206,7 @@ public class Buffers { > } > > public static CharBuffer newDirectCharBuffer(final char[] values, final int offset, final int length) { >- return (CharBuffer)newDirectCharBuffer(length).put(values, offset, length).rewind(); >+ return (CharBuffer)newDirectCharBuffer(length).put(values, offset, length).clear(); > } > > public static CharBuffer newDirectCharBuffer(final char[] values, final int offset) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1180
: 708 |
709