public class GLBuffers
extends com.jogamp.common.nio.Buffers
| Constructor and Description |
|---|
GLBuffers() |
| Modifier and Type | Method and Description |
|---|---|
static float[] |
getFloatArray(double[] source) |
static int |
getNextPowerOf2(int number) |
static Buffer |
newDirectGLBuffer(int glType,
int numElements) |
static int |
sizeof(GL gl,
int[] tmp,
int bytesPerElement,
int width,
int height,
int depth,
boolean pack)
Returns the number of bytes required to read/write a memory buffer via OpenGL
using the current GL pixel storage state and the given parameters.
|
static int |
sizeof(GL gl,
int[] tmp,
int format,
int type,
int width,
int height,
int depth,
boolean pack)
Returns the number of bytes required to read/write a memory buffer via OpenGL
using the current GL pixel storage state and the given parameters.
|
static int |
sizeOfGLType(int glType) |
static Buffer |
sliceGLBuffer(ByteBuffer parent,
int bytePos,
int byteLen,
int glType) |
copyByteBuffer, copyFloatBuffer, copyFloatBufferAsByteBuffer, copyIntBuffer, copyIntBufferAsByteBuffer, copyShortBuffer, copyShortBufferAsByteBuffer, getArray, getDirectBufferByteOffset, getDoubleArray, getDoubleBuffer, getFloatArray, getFloatBuffer, getIndirectBufferByteOffset, isDirect, nativeOrder, newDirectByteBuffer, newDirectByteBuffer, newDirectByteBuffer, newDirectByteBuffer, newDirectCharBuffer, newDirectCharBuffer, newDirectCharBuffer, newDirectCharBuffer, newDirectDoubleBuffer, newDirectDoubleBuffer, newDirectDoubleBuffer, newDirectDoubleBuffer, newDirectFloatBuffer, newDirectFloatBuffer, newDirectFloatBuffer, newDirectFloatBuffer, newDirectIntBuffer, newDirectIntBuffer, newDirectIntBuffer, newDirectIntBuffer, newDirectLongBuffer, newDirectLongBuffer, newDirectLongBuffer, newDirectLongBuffer, newDirectShortBuffer, newDirectShortBuffer, newDirectShortBuffer, newDirectShortBuffer, put, putb, putd, putf, puti, puts, rangeCheck, rangeCheck, rangeCheck, rangeCheck, rangeCheck, rangeCheck, rangeCheck, rangeCheck, rangeCheckBytes, sizeOfBufferElem, slice, slice, slice2Floatpublic static final int sizeOfGLType(int glType)
glType - shall be one of (29) public static final Buffer newDirectGLBuffer(int glType, int numElements)
glType - shall be one of (29) public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType)
glType - shall be one of (29) public static final int sizeof(GL gl, int[] tmp, int bytesPerElement, int width, int height, int depth, boolean pack)
This method is security critical, hence it throws an exception (fail-fast) in case of an invalid alignment. In case we forgot to handle proper values, please contact the maintainer.
gl - the current GL objecttmp - a pass through integer array of size >= 1 used to store temp data (performance)bytesPerElement - bytes per elementwidth - in pixelsheight - in pixelsdepth - in pixelspack - true for read mode GPU -> CPU (pack), otherwise false for write mode CPU -> GPU (unpack)GLException - if alignment is invalid. Please contact the maintainer if this is our bug.public static final int sizeof(GL gl, int[] tmp, int format, int type, int width, int height, int depth, boolean pack) throws GLException
This method is security critical, hence it throws an exception (fail-fast) in case either the format, type or alignment is unhandled. In case we forgot to handle proper values, please contact the maintainer.
gl - the current GL objecttmp - a pass through integer array of size >= 1 used to store temp data (performance)format - must be one of (26) type - must be one of (30) width - in pixelsheight - in pixelsdepth - in pixelspack - true for read mode GPU -> CPU, otherwise false for write mode CPU -> GPUGLException - if format, type or alignment is not handled. Please contact the maintainer if this is our bug.public static final int getNextPowerOf2(int number)
public static final float[] getFloatArray(double[] source)
Copyright 2010 JogAmp Community.