public final class BufferUtils extends Object
Constructor and Description |
---|
BufferUtils() |
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
createByteBuffer(int size)
Construct a direct native-ordered bytebuffer with the specified size.
|
static CharBuffer |
createCharBuffer(int size)
Construct a direct native-order charbuffer with the specified number
of elements.
|
static DoubleBuffer |
createDoubleBuffer(int size)
Construct a direct native-order doublebuffer with the specified number
of elements.
|
static FloatBuffer |
createFloatBuffer(int size)
Construct a direct native-order floatbuffer with the specified number
of elements.
|
static IntBuffer |
createIntBuffer(int size)
Construct a direct native-order intbuffer with the specified number
of elements.
|
static LongBuffer |
createLongBuffer(int size)
Construct a direct native-order longbuffer with the specified number
of elements.
|
static PointerBuffer |
createPointerBuffer(int size)
Construct a PointerBuffer with the specified number
of elements.
|
static ShortBuffer |
createShortBuffer(int size)
Construct a direct native-order shortbuffer with the specified number
of elements.
|
static int |
getElementSizeExponent(Buffer buf) |
static int |
getOffset(Buffer buffer)
A helper function which is used to get the byte offset in an arbitrary buffer
based on its position
|
static void |
zeroBuffer(ByteBuffer b)
Fill buffer with zeros from position to remaining
|
static void |
zeroBuffer(CharBuffer b)
Fill buffer with zeros from position to remaining
|
static void |
zeroBuffer(DoubleBuffer b)
Fill buffer with zeros from position to remaining
|
static void |
zeroBuffer(FloatBuffer b)
Fill buffer with zeros from position to remaining
|
static void |
zeroBuffer(IntBuffer b)
Fill buffer with zeros from position to remaining
|
static void |
zeroBuffer(LongBuffer b)
Fill buffer with zeros from position to remaining
|
static void |
zeroBuffer(ShortBuffer b)
Fill buffer with zeros from position to remaining
|
public static ByteBuffer createByteBuffer(int size)
size
- The size, in bytespublic static ShortBuffer createShortBuffer(int size)
size
- The size, in shortspublic static CharBuffer createCharBuffer(int size)
size
- The size, in charspublic static IntBuffer createIntBuffer(int size)
size
- The size, in intspublic static LongBuffer createLongBuffer(int size)
size
- The size, in longspublic static FloatBuffer createFloatBuffer(int size)
size
- The size, in floatspublic static DoubleBuffer createDoubleBuffer(int size)
size
- The size, in floatspublic static PointerBuffer createPointerBuffer(int size)
size
- The size, in memory addressespublic static int getElementSizeExponent(Buffer buf)
public static int getOffset(Buffer buffer)
public static void zeroBuffer(ByteBuffer b)
public static void zeroBuffer(ShortBuffer b)
public static void zeroBuffer(CharBuffer b)
public static void zeroBuffer(IntBuffer b)
public static void zeroBuffer(FloatBuffer b)
public static void zeroBuffer(LongBuffer b)
public static void zeroBuffer(DoubleBuffer b)
Copyright © 2002-2009 lwjgl.org. All Rights Reserved.