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.
SIZEOF_DOUBLE
public static final int SIZEOF_DOUBLE
SIZEOF_FLOAT
public static final int SIZEOF_FLOAT
SIZEOF_INT
public static final int SIZEOF_INT
bufferOffset
public static 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.
copyByteBuffer
public static ByteBuffer copyByteBuffer(ByteBuffer orig)
copyDoubleBuffer
public static DoubleBuffer copyDoubleBuffer(DoubleBuffer orig)
copyFloatBuffer
public static FloatBuffer copyFloatBuffer(FloatBuffer orig)
copyIntBuffer
public static IntBuffer copyIntBuffer(IntBuffer orig)
newByteBuffer
public static ByteBuffer newByteBuffer(int numElements)
newDoubleBuffer
public static DoubleBuffer newDoubleBuffer(int numElements)
newFloatBuffer
public static FloatBuffer newFloatBuffer(int numElements)
newIntBuffer
public static IntBuffer newIntBuffer(int numElements)