|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.javagl.swogl.BufferUtils
public class BufferUtils
Utility methods for buffers
Method Summary | |
---|---|
static java.nio.ByteBuffer |
createByteBuffer(int size)
Create a direct byte buffer with the given size |
static java.nio.ByteBuffer |
createDirectBuffer(byte[] a)
Create a direct byte buffer which has the contents of the given array. |
static java.nio.FloatBuffer |
createDirectBuffer(float[] a)
Create a direct float buffer which has the contents of the given array. |
static java.nio.IntBuffer |
createDirectBuffer(int[] a)
Create a direct int buffer which has the contents of the given array. |
static java.nio.FloatBuffer |
createFloatBuffer(int size)
Create a direct float buffer with the given size |
static java.nio.IntBuffer |
createIntBuffer(int size)
Create a direct int buffer with the given size |
static java.nio.FloatBuffer |
ensureBuffer(java.nio.FloatBuffer buffer,
int size)
Utility method that returns a buffer with the specified size, or the given buffer if it was non- null and had
at least the requested size. |
static java.nio.IntBuffer |
ensureBuffer(java.nio.IntBuffer buffer,
int size)
Utility method that returns a buffer with the specified size, or the given buffer if it was non- null and had
at least the requested size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.nio.ByteBuffer createByteBuffer(int size)
size
- The size of the buffer
public static java.nio.FloatBuffer createFloatBuffer(int size)
size
- The size of the buffer
public static java.nio.IntBuffer createIntBuffer(int size)
size
- The size of the buffer
public static java.nio.ByteBuffer createDirectBuffer(byte[] a)
a
- The array
public static java.nio.IntBuffer createDirectBuffer(int[] a)
a
- The array
public static java.nio.FloatBuffer createDirectBuffer(float[] a)
a
- The array
public static java.nio.IntBuffer ensureBuffer(java.nio.IntBuffer buffer, int size)
null
and had
at least the requested size.
buffer
- The buffersize
- The size
public static java.nio.FloatBuffer ensureBuffer(java.nio.FloatBuffer buffer, int size)
null
and had
at least the requested size.
buffer
- The buffersize
- The size
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |