public class GLPixelStorageModes extends Object
PACK for GPU to CPU transfers, e.g. ReadPixels
, etc.
UNPACK for CPU o GPU transfers, e.g. TexImage2D
, etc
Constructor and Description |
---|
GLPixelStorageModes()
Create instance w/o
saveAll(GL) |
GLPixelStorageModes(GL gl)
Create instance w/
saveAll(GL) |
Modifier and Type | Method and Description |
---|---|
void |
resetAll(GL gl)
Resets PACK and UNPACK pixel storage modes to their default value,
i.e.
|
void |
resetPack(GL gl)
Resets PACK pixel storage modes to their default value.
|
void |
resetUnpack(GL gl)
Resets UNPACK pixel storage modes to their default value.
|
void |
restore(GL gl)
Restores PACK and UNPACK pixel storage mode previously saved w/
saveAll(GL)
or savePack(GL) and saveUnpack(GL) . |
void |
saveAll(GL gl)
Saves PACK and UNPACK pixel storage modes and
resets them,
i.e. |
void |
savePack(GL gl)
Saves PACK pixel storage modes and
resets them. |
void |
saveUnpack(GL gl)
Saves UNPACK pixel storage modes and
resets them. |
void |
setAlignment(GL gl,
int packAlignment,
int unpackAlignment)
Sets the
GL.GL_PACK_ALIGNMENT and GL.GL_UNPACK_ALIGNMENT . |
void |
setPackAlignment(GL gl,
int packAlignment)
Sets the
GL.GL_PACK_ALIGNMENT . |
void |
setPackRowLength(GL2ES3 gl,
int packRowLength)
Sets the
GL2ES3.GL_PACK_ROW_LENGTH . |
void |
setRowLength(GL2ES3 gl,
int packRowLength,
int unpackRowLength)
|
void |
setUnpackAlignment(GL gl,
int unpackAlignment)
Sets the
GL.GL_UNPACK_ALIGNMENT . |
void |
setUnpackRowLength(GL2ES3 gl,
int unpackRowLength)
Sets the
GL2ES2.GL_UNPACK_ROW_LENGTH . |
public GLPixelStorageModes()
saveAll(GL)
public GLPixelStorageModes(GL gl)
saveAll(GL)
public final void setPackAlignment(GL gl, int packAlignment)
GL.GL_PACK_ALIGNMENT
.
Saves the PACK pixel storage modes and resets
them if not saved yet, see savePack(GL)
.
public final void setUnpackAlignment(GL gl, int unpackAlignment)
GL.GL_UNPACK_ALIGNMENT
.
Saves the UNPACK pixel storage modes and resets
them if not saved yet, see saveUnpack(GL)
.
public final void setAlignment(GL gl, int packAlignment, int unpackAlignment)
GL.GL_PACK_ALIGNMENT
and GL.GL_UNPACK_ALIGNMENT
.
Saves the PACK and UNPACK pixel storage modes and resets them if not saved yet, see saveAll(GL)
.
public final void setPackRowLength(GL2ES3 gl, int packRowLength)
GL2ES3.GL_PACK_ROW_LENGTH
.
Saves the PACK pixel storage modes and resets
them if not saved yet, see savePack(GL)
.
public final void setUnpackRowLength(GL2ES3 gl, int unpackRowLength)
GL2ES2.GL_UNPACK_ROW_LENGTH
.
Saves the UNPACK pixel storage modes and resets
them if not saved yet, see saveUnpack(GL)
.
public final void setRowLength(GL2ES3 gl, int packRowLength, int unpackRowLength)
GL2ES3.GL_PACK_ROW_LENGTH
and GL2ES2.GL_UNPACK_ROW_LENGTH
if GLBase.isGL2ES3()
.
Saves the PACK and UNPACK pixel storage modes and resets them if not saved yet, see saveAll(GL)
.
public final void saveAll(GL gl)
resets
them,
i.e. issues savePack(GL)
and saveUnpack(GL)
.
Operation is skipped, if the modes were already saved.
Restore via restore(GL)
public final void resetAll(GL gl)
resetPack(GL)
and resetUnpack(GL)
.public final void restore(GL gl) throws GLException
saveAll(GL)
or savePack(GL)
and saveUnpack(GL)
.GLException
- if neither PACK nor UNPACK modes were saved.public final void resetPack(GL gl)
public final void savePack(GL gl)
resets
them.
Operation is skipped, if the modes were already saved.
Restore via restore(GL)
public final void resetUnpack(GL gl)
public final void saveUnpack(GL gl)
resets
them.
Operation is skipped, if the modes were already saved.
Restore via restore(GL)
Copyright 2010 JogAmp Community.