JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.GLPixelStorageModes Class Reference

Utility to safely set and restore the PACK and UNPACK pixel storage mode, regardless of the GLProfile. More...

Collaboration diagram for com.jogamp.opengl.util.GLPixelStorageModes:

Public Member Functions

 GLPixelStorageModes ()
 Create instance w/o saveAll(GL). More...
 
 GLPixelStorageModes (final GL gl)
 Create instance w/ saveAll(GL). More...
 
final void setPackAlignment (final GL gl, final int packAlignment)
 Sets the GL#GL_PACK_ALIGNMENT. More...
 
final void setUnpackAlignment (final GL gl, final int unpackAlignment)
 Sets the GL#GL_UNPACK_ALIGNMENT. More...
 
final void setAlignment (final GL gl, final int packAlignment, final int unpackAlignment)
 Sets the GL#GL_PACK_ALIGNMENT and GL#GL_UNPACK_ALIGNMENT. More...
 
final void setPackRowLength (final GL2ES3 gl, final int packRowLength)
 Sets the GL2ES3#GL_PACK_ROW_LENGTH. More...
 
final void setUnpackRowLength (final GL2ES3 gl, final int unpackRowLength)
 Sets the GL2ES2#GL_UNPACK_ROW_LENGTH. More...
 
final void setRowLength (final GL2ES3 gl, final int packRowLength, final int unpackRowLength)
 Sets the GL2ES3#GL_PACK_ROW_LENGTH and GL2ES2#GL_UNPACK_ROW_LENGTH if GL#isGL2ES3(). More...
 
final void saveAll (final GL gl)
 Saves PACK and UNPACK pixel storage modes and resets them, i.e. More...
 
final void resetAll (final GL gl)
 Resets PACK and UNPACK pixel storage modes to their default value, i.e. More...
 
final void restore (final GL gl) throws GLException
 Restores PACK and UNPACK pixel storage mode previously saved w/ saveAll(GL) or savePack(GL) and saveUnpack(GL). More...
 
final void resetPack (final GL gl)
 Resets PACK pixel storage modes to their default value. More...
 
final void savePack (final GL gl)
 Saves PACK pixel storage modes and resets them. More...
 
final void resetUnpack (final GL gl)
 Resets UNPACK pixel storage modes to their default value. More...
 
final void saveUnpack (final GL gl)
 Saves UNPACK pixel storage modes and resets them. More...
 

Detailed Description

Utility to safely set and restore the PACK and UNPACK pixel storage mode, regardless of the GLProfile.

PACK for GPU to CPU transfers, e.g. ReadPixels, etc.

UNPACK for CPU o GPU transfers, e.g. TexImage2D, etc

Definition at line 49 of file GLPixelStorageModes.java.

Constructor & Destructor Documentation

◆ GLPixelStorageModes() [1/2]

com.jogamp.opengl.util.GLPixelStorageModes.GLPixelStorageModes ( )

Create instance w/o saveAll(GL).

Definition at line 56 of file GLPixelStorageModes.java.

◆ GLPixelStorageModes() [2/2]

com.jogamp.opengl.util.GLPixelStorageModes.GLPixelStorageModes ( final GL  gl)

Create instance w/ saveAll(GL).

Definition at line 59 of file GLPixelStorageModes.java.

Here is the call graph for this function:

Member Function Documentation

◆ resetAll()

final void com.jogamp.opengl.util.GLPixelStorageModes.resetAll ( final GL  gl)

Resets PACK and UNPACK pixel storage modes to their default value, i.e.

issues resetPack(GL) and resetUnpack(GL).

Definition at line 146 of file GLPixelStorageModes.java.

Here is the call graph for this function:

◆ resetPack()

final void com.jogamp.opengl.util.GLPixelStorageModes.resetPack ( final GL  gl)

Resets PACK pixel storage modes to their default value.

Definition at line 173 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetUnpack()

final void com.jogamp.opengl.util.GLPixelStorageModes.resetUnpack ( final GL  gl)

Resets UNPACK pixel storage modes to their default value.

Definition at line 246 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore()

final void com.jogamp.opengl.util.GLPixelStorageModes.restore ( final GL  gl) throws GLException

Restores PACK and UNPACK pixel storage mode previously saved w/ saveAll(GL) or savePack(GL) and saveUnpack(GL).

Exceptions
GLExceptionif neither PACK nor UNPACK modes were saved.

Definition at line 156 of file GLPixelStorageModes.java.

Here is the caller graph for this function:

◆ saveAll()

final void com.jogamp.opengl.util.GLPixelStorageModes.saveAll ( final GL  gl)

Saves PACK and UNPACK pixel storage modes and resets them, i.e.

issues savePack(GL) and saveUnpack(GL).

Operation is skipped, if the modes were already saved.

Restore via restore(GL)

Definition at line 137 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ savePack()

final void com.jogamp.opengl.util.GLPixelStorageModes.savePack ( final GL  gl)

Saves PACK pixel storage modes and resets them.

Operation is skipped, if the modes were already saved.

Restore via restore(GL)

Definition at line 199 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveUnpack()

final void com.jogamp.opengl.util.GLPixelStorageModes.saveUnpack ( final GL  gl)

Saves UNPACK pixel storage modes and resets them.

Operation is skipped, if the modes were already saved.

Restore via restore(GL)

Definition at line 275 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAlignment()

final void com.jogamp.opengl.util.GLPixelStorageModes.setAlignment ( final GL  gl,
final int  packAlignment,
final int  unpackAlignment 
)

Sets the 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).

Definition at line 89 of file GLPixelStorageModes.java.

Here is the call graph for this function:

◆ setPackAlignment()

final void com.jogamp.opengl.util.GLPixelStorageModes.setPackAlignment ( final GL  gl,
final int  packAlignment 
)

Sets the GL#GL_PACK_ALIGNMENT.

Saves the PACK pixel storage modes and resets them if not saved yet, see savePack(GL).

Definition at line 67 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPackRowLength()

final void com.jogamp.opengl.util.GLPixelStorageModes.setPackRowLength ( final GL2ES3  gl,
final int  packRowLength 
)

Sets the GL2ES3#GL_PACK_ROW_LENGTH.

Saves the PACK pixel storage modes and resets them if not saved yet, see savePack(GL).

Definition at line 100 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRowLength()

final void com.jogamp.opengl.util.GLPixelStorageModes.setRowLength ( final GL2ES3  gl,
final int  packRowLength,
final int  unpackRowLength 
)

Sets the GL2ES3#GL_PACK_ROW_LENGTH and GL2ES2#GL_UNPACK_ROW_LENGTH if GL#isGL2ES3().

Saves the PACK and UNPACK pixel storage modes and resets them if not saved yet, see saveAll(GL).

Definition at line 122 of file GLPixelStorageModes.java.

Here is the call graph for this function:

◆ setUnpackAlignment()

final void com.jogamp.opengl.util.GLPixelStorageModes.setUnpackAlignment ( final GL  gl,
final int  unpackAlignment 
)

Sets the GL#GL_UNPACK_ALIGNMENT.

Saves the UNPACK pixel storage modes and resets them if not saved yet, see saveUnpack(GL).

Definition at line 78 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUnpackRowLength()

final void com.jogamp.opengl.util.GLPixelStorageModes.setUnpackRowLength ( final GL2ES3  gl,
final int  unpackRowLength 
)

Sets the GL2ES2#GL_UNPACK_ROW_LENGTH.

Saves the UNPACK pixel storage modes and resets them if not saved yet, see saveUnpack(GL).

Definition at line 111 of file GLPixelStorageModes.java.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: