net.java.games.jogl.util
Class BufferUtils
java.lang.Object
net.java.games.jogl.util.BufferUtils
- public class BufferUtils
- extends java.lang.Object
Utility routines for dealing with direct buffers.
Method Summary |
static java.nio.ByteBuffer |
bufferOffset(int offset)
Creates an "offset buffer" for use with the
ARB_vertex_buffer_object extension. |
static java.nio.FloatBuffer |
copyFloatBuffer(java.nio.FloatBuffer orig)
|
static java.nio.ByteBuffer |
newByteBuffer(int numElements)
|
static java.nio.FloatBuffer |
newFloatBuffer(int numElements)
|
static java.nio.IntBuffer |
newIntBuffer(int numElements)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIZEOF_FLOAT
public static final int SIZEOF_FLOAT
- See Also:
- Constant Field Values
SIZEOF_INT
public static final int SIZEOF_INT
- See Also:
- Constant Field Values
BufferUtils
public BufferUtils()
newFloatBuffer
public static java.nio.FloatBuffer newFloatBuffer(int numElements)
newIntBuffer
public static java.nio.IntBuffer newIntBuffer(int numElements)
newByteBuffer
public static java.nio.ByteBuffer newByteBuffer(int numElements)
copyFloatBuffer
public static java.nio.FloatBuffer copyFloatBuffer(java.nio.FloatBuffer orig)
bufferOffset
public static java.nio.ByteBuffer bufferOffset(int offset)
- Creates an "offset buffer" for use with the
ARB_vertex_buffer_object extension. The resulting Buffers are
suitable for use with routines such as glVertexPointer when
used in conjunction with that extension. They have no
capacity and are not suitable for passing to OpenGL routines
that do not support buffer offsets, or to non-OpenGL
routines.