|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neovisionaries.android.opengl.BufferCreator
public final class BufferCreator
Buffer creator.
Method Summary | |
---|---|
static ByteBuffer |
createByteBuffer(byte[] data)
This method is an alias of createByteBuffer (data, 0, data.length). |
static ByteBuffer |
createByteBuffer(byte[] data,
int offset,
int length)
Create a direct ByteBuffer with the native byte order. |
static ByteBuffer |
createByteBuffer(int size)
Create a direct ByteBuffer with the native byte order. |
static FloatBuffer |
createFloatBuffer(float[] data)
This method is an alias of createFloatBuffer (data, 0, data.length). |
static FloatBuffer |
createFloatBuffer(float[] data,
int offset,
int length)
Create a direct FloatBuffer with the native byte order. |
static FloatBuffer |
createFloatBuffer(int size)
Create a direct FloatBuffer with the native byte order. |
static IntBuffer |
createIntBuffer(int size)
Create a direct IntBuffer with the native byte order. |
static IntBuffer |
createIntBuffer(int[] data)
This method is an alias of createIntBuffer (data, 0, data.length). |
static IntBuffer |
createIntBuffer(int[] data,
int offset,
int length)
Create a direct IntBuffer with the native byte order. |
static ShortBuffer |
createShortBuffer(int size)
Create a direct ShortBuffer with the native byte order. |
static ShortBuffer |
createShortBuffer(short[] data)
This method is an alias of createShortBuffer (data, 0, data.length). |
static ShortBuffer |
createShortBuffer(short[] data,
int offset,
int length)
Create a direct ShortBuffer with the native byte order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ByteBuffer createByteBuffer(int size)
Internally, a ByteBuffer is created by ByteBuffer.allocateDirect(size) and its byte order is set to the native byte order, and this method returns the ByteBuffer.
size
- The number of elements that the created ByteBuffer
should be able to hold.
IllegalArgumentException
- 'size' is 0 or negative.public static ByteBuffer createByteBuffer(byte[] data, int offset, int length)
Int values from the offset in the data array up to the specified length are set to a newly allocated ByteBuffer.
data
- Data to set to a newly allocated ByteBuffer.offset
- The offset from the beginning of the data array.length
- The number of int values to use.
IllegalArgumentException
- public static ByteBuffer createByteBuffer(byte[] data)
createByteBuffer
(data, 0, data.length).
data
- Data to set to a newly allocated ByteBuffer.
IllegalArgumentException
- 'data' is null or its length is 0.public static ShortBuffer createShortBuffer(int size)
Internally, a ByteBuffer is created by ByteBuffer.allocateDirect(size * 2) and its byte order is set to the native byte order. What is returned by this method is the ByteBuffer's view as ShortBuffer.
size
- The number of elements that the created ShortBuffer
should be able to hold. Note that the unit is not
'bytes'.
IllegalArgumentException
- 'size' is 0 or negative.public static ShortBuffer createShortBuffer(short[] data, int offset, int length)
Int values from the offset in the data array up to the specified length are set to a newly allocated ShortBuffer.
data
- Data to set to a newly allocated ShortBuffer.offset
- The offset from the beginning of the data array.length
- The number of int values to use.
IllegalArgumentException
- public static ShortBuffer createShortBuffer(short[] data)
createShortBuffer
(data, 0, data.length).
data
- Data to set to a newly allocated ShortBuffer.
IllegalArgumentException
- 'data' is null or its length is 0.public static IntBuffer createIntBuffer(int size)
Internally, a ByteBuffer is created by ByteBuffer.allocateDirect(size * 4) and its byte order is set to the native byte order. What is returned by this method is the ByteBuffer's view as IntBuffer.
size
- The number of elements that the created IntBuffer
should be able to hold. Note that the unit is not
'bytes'.
IllegalArgumentException
- 'size' is 0 or negative.public static IntBuffer createIntBuffer(int[] data, int offset, int length)
Int values from the offset in the data array up to the specified length are set to a newly allocated IntBuffer.
data
- Data to set to a newly allocated IntBuffer.offset
- The offset from the beginning of the data array.length
- The number of int values to use.
IllegalArgumentException
- public static IntBuffer createIntBuffer(int[] data)
createIntBuffer
(data, 0, data.length).
data
- Data to set to a newly allocated IntBuffer.
IllegalArgumentException
- 'data' is null or its length is 0.public static FloatBuffer createFloatBuffer(int size)
Internally, a ByteBuffer is created by ByteBuffer.allocateDirect(size * 4) and its byte order is set to the native byte order. What is returned by this method is the ByteBuffer's view as FloatBuffer.
size
- The number of elements that the created FloatBuffer
should be able to hold. Note that the unit is not
'bytes'.
IllegalArgumentException
- 'size' is 0 or negative.public static FloatBuffer createFloatBuffer(float[] data, int offset, int length)
Float values from the offset in the data array up to the specified length are set to a newly allocated FloatBuffer.
data
- Data to set to a newly allocated FloatBuffer.offset
- The offset from the beginning of the data array.length
- The number of float values to use.
IllegalArgumentException
- public static FloatBuffer createFloatBuffer(float[] data)
createFloatBuffer
(data, 0, data.length).
data
- Data to set to a newly allocated FloatBuffer.
IllegalArgumentException
- 'data' is null or its length is 0.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |