|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Utility routines for dealing with direct buffers. More...
Static Public Member Functions | |
| static final boolean | isSignedGLType (final int glType) |
| static final boolean | isGLTypeFixedPoint (final int glType) |
| static final int | sizeOfGLType (final int glType) |
| static final Buffer | newDirectGLBuffer (final int glType, final int numElements) |
| static final Buffer | sliceGLBuffer (final ByteBuffer parent, final int bytePos, final int byteLen, final int glType) |
| static final int | sizeof (final GL gl, final int tmp[], final int bytesPerPixel, int width, int height, int depth, final 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. More... | |
| static final int | sizeof (final GL gl, final int tmp[], final int format, final int type, final int width, final int height, final int depth, final boolean pack) throws GLException |
| 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. More... | |
| static final int | bytesPerPixel (final int format, final int type) throws GLException |
| Returns the number of bytes required for one pixel with the the given OpenGL format and type. More... | |
| static final int | componentCount (final int format) throws GLException |
| Returns the number of components required for the given OpenGL format. More... | |
| static final int | getNextPowerOf2 (int number) |
| static final float[] | getFloatArray (final double[] source) |
Utility routines for dealing with direct buffers.
Definition at line 60 of file GLBuffers.java.
|
static |
Returns the number of bytes required for one pixel with the the given OpenGL format and type.
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.
See componentCount(int).
| format | must be one of (27) GL_COLOR_INDEX GL_STENCIL_INDEX GL_DEPTH_COMPONENT GL_DEPTH_STENCIL GL_RED GL_RED_INTEGER GL_GREEN GL_GREEN_INTEGER GL_BLUE GL_BLUE_INTEGER GL_ALPHA GL_LUMINANCE (12) GL_LUMINANCE_ALPHA GL_RG GL_RG_INTEGER GL_HILO_NV GL_SIGNED_HILO_NV (5) GL_YCBCR_422_APPLE GL_RGB GL_RGB_INTEGER GL_BGR GL_BGR_INTEGER (4) GL_RGBA GL_RGBA_INTEGER GL_BGRA GL_BGRA_INTEGER GL_ABGR_EXT (5) |
| type | must be one of (32) GL_BITMAP, GL_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_SHORT, GL_UNSIGNED_SHORT, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_SHORT_8_8_APPLE, GL_UNSIGNED_SHORT_8_8_REV_APPLE, GL_HALF_FLOAT, GL_HALF_FLOAT_OES GL_FIXED, GL_INT GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV GL_HILO16_NV, GL_SIGNED_HILO16_NV GL_FLOAT_32_UNSIGNED_INT_24_8_REV GL_FLOAT, GL_DOUBLE |
| GLException | if format or type alignment is not handled. Please contact the maintainer if this is our bug. |
Definition at line 587 of file GLBuffers.java.
|
static |
Returns the number of components required for the given OpenGL format.
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.
| format | must be one of (27) GL_COLOR_INDEX GL_STENCIL_INDEX GL_DEPTH_COMPONENT GL_DEPTH_STENCIL GL_RED GL_RED_INTEGER GL_GREEN GL_GREEN_INTEGER GL_BLUE GL_BLUE_INTEGER GL_ALPHA GL_LUMINANCE (12) GL_LUMINANCE_ALPHA GL_RG GL_RG_INTEGER GL_HILO_NV GL_SIGNED_HILO_NV (5) GL_YCBCR_422_APPLE GL_RGB GL_RGB_INTEGER GL_BGR GL_BGR_INTEGER (4) GL_RGBA GL_RGBA_INTEGER GL_BGRA GL_BGRA_INTEGER GL_ABGR_EXT (5) |
| GLException | if format is not handled. Please contact the maintainer if this is our bug. |
Definition at line 693 of file GLBuffers.java.
|
static |
Definition at line 760 of file GLBuffers.java.
|
static |
Definition at line 744 of file GLBuffers.java.
|
static |
| glType | GL primitive type |
Definition at line 90 of file GLBuffers.java.
|
static |
| glType | GL primitive type |
Definition at line 70 of file GLBuffers.java.
|
static |
| glType | shall be one of (31) GL_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_SHORT, GL_UNSIGNED_SHORT, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_SHORT_8_8_APPLE, GL_UNSIGNED_SHORT_8_8_REV_APPLE, GL_HALF_FLOAT, GL_HALF_FLOAT_OES GL_FIXED, GL_INT GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV GL_HILO16_NV, GL_SIGNED_HILO16_NV GL_FLOAT_32_UNSIGNED_INT_24_8_REV GL_FLOAT, GL_DOUBLE |
Definition at line 202 of file GLBuffers.java.
|
static |
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.
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 object |
| tmp | a pass through integer array of size >= 1 used to store temp data (performance) |
| bytesPerPixel | bytes per pixel, i.e. via bytesPerPixel(int, int). |
| width | in pixels |
| height | in pixels |
| depth | in pixels |
| pack | 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. |
Definition at line 364 of file GLBuffers.java.
|
static |
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.
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 object |
| tmp | a pass through integer array of size >= 1 used to store temp data (performance) |
| format | must be one of (27) GL_COLOR_INDEX GL_STENCIL_INDEX GL_DEPTH_COMPONENT GL_DEPTH_STENCIL GL_RED GL_RED_INTEGER GL_GREEN GL_GREEN_INTEGER GL_BLUE GL_BLUE_INTEGER GL_ALPHA GL_LUMINANCE (12) GL_LUMINANCE_ALPHA GL_RG GL_RG_INTEGER GL_HILO_NV GL_SIGNED_HILO_NV (5) GL_YCBCR_422_APPLE GL_RGB GL_RGB_INTEGER GL_BGR GL_BGR_INTEGER (4) GL_RGBA GL_RGBA_INTEGER GL_BGRA GL_BGRA_INTEGER GL_ABGR_EXT (5) |
| type | must be one of (32) GL_BITMAP, GL_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_SHORT, GL_UNSIGNED_SHORT, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_SHORT_8_8_APPLE, GL_UNSIGNED_SHORT_8_8_REV_APPLE, GL_HALF_FLOAT, GL_HALF_FLOAT_OES GL_FIXED, GL_INT GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV GL_HILO16_NV, GL_SIGNED_HILO16_NV GL_FLOAT_32_UNSIGNED_INT_24_8_REV GL_FLOAT, GL_DOUBLE |
| width | in pixels |
| height | in pixels |
| depth | in pixels |
| pack | true for read mode GPU -> CPU, otherwise false for write mode CPU -> GPU |
| GLException | if format, type or alignment is not handled. Please contact the maintainer if this is our bug. |
Definition at line 520 of file GLBuffers.java.
|
static |
| glType | shall be one of (31) GL_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_SHORT, GL_UNSIGNED_SHORT, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_SHORT_8_8_APPLE, GL_UNSIGNED_SHORT_8_8_REV_APPLE, GL.GL_HALF_FLOAT, GLES2.GL_HALF_FLOAT_OES: GL_FIXED, GL_INT GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV GL_HILO16_NV, GL_SIGNED_HILO16_NV GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV GL_FLOAT, GL_DOUBLE |
Definition at line 128 of file GLBuffers.java.
|
static |
| glType | shall be one of (31) GL_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_SHORT, GL_UNSIGNED_SHORT, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_SHORT_8_8_APPLE, GL_UNSIGNED_SHORT_8_8_REV_APPLE, GL_HALF_FLOAT, GL_HALF_FLOAT_OES GL_FIXED, GL_INT GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV GL_HILO16_NV, GL_SIGNED_HILO16_NV GL_FLOAT_32_UNSIGNED_INT_24_8_REV GL_FLOAT, GL_DOUBLE |
Definition at line 274 of file GLBuffers.java.