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

Pixel attributes. More...

Collaboration diagram for com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes:

Public Member Functions

final int hashCode ()
 
final boolean equals (final Object obj)
 
 GLPixelAttributes (final int dataFormat, final int dataType) throws GLException
 Create a new GLPixelAttributes instance based on GL format and type. More...
 
 GLPixelAttributes (final GLProfile glp, final PixelFormat pixFmt, final boolean pack) throws GLException
 Create a new GLPixelAttributes instance based on GLProfile, PixelFormat and pack. More...
 
String toString ()
 

Static Public Member Functions

static final PixelFormat getPixelFormat (final int glFormat, final int glDataType)
 Returns the matching PixelFormat for the given GL format and type if exists, otherwise returns null. More...
 
static GLPixelAttributes convert (final GL gl, final int componentCount, final boolean pack)
 Returns the matching GLPixelAttributes for the given byte sized RGBA componentCount and GL if exists, otherwise returns null. More...
 
static final GLPixelAttributes convert (final GLProfile glp, final PixelFormat pixFmt, final boolean pack)
 Returns the matching GLPixelAttributes for the given GLProfile, PixelFormat and pack if exists, otherwise returns null. More...
 

Public Attributes

final int format
 The OpenGL pixel data format. More...
 
final int type
 The OpenGL pixel data type
More...
 
final PixelFormat pfmt
 PixelFormat describing the component layout More...
 

Static Public Attributes

static final GLPixelAttributes UNDEF = new GLPixelAttributes(null, PixelFormat.LUMINANCE, 0, 0, true, false)
 Undefined instance of GLPixelAttributes, having componentCount:=0, format:=0 and type:= 0. More...
 

Detailed Description

Pixel attributes.

Definition at line 227 of file GLPixelBuffer.java.

Constructor & Destructor Documentation

◆ GLPixelAttributes() [1/2]

com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.GLPixelAttributes ( final int  dataFormat,
final int  dataType 
) throws GLException

Create a new GLPixelAttributes instance based on GL format and type.

Parameters
dataFormatGL data format
dataTypeGL data type
Exceptions
GLExceptionif PixelFormat could not be determined, see getPixelFormat(int, int).

Definition at line 473 of file GLPixelBuffer.java.

Here is the caller graph for this function:

◆ GLPixelAttributes() [2/2]

com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.GLPixelAttributes ( final GLProfile  glp,
final PixelFormat  pixFmt,
final boolean  pack 
) throws GLException

Create a new GLPixelAttributes instance based on GLProfile, PixelFormat and pack.

Parameters
glpthe corresponding GLProfile
pixFmtthe to be matched pixel format
packtrue for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D.
Exceptions
GLExceptionif GL format or type could not be determined, see convert(GLProfile, PixelFormat, boolean).

Definition at line 485 of file GLPixelBuffer.java.

Member Function Documentation

◆ convert() [1/2]

static GLPixelAttributes com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.convert ( final GL  gl,
final int  componentCount,
final boolean  pack 
)
static

Returns the matching GLPixelAttributes for the given byte sized RGBA componentCount and GL if exists, otherwise returns null.

Parameters
glthe corresponding current GL context object
componentCountRGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)
packtrue for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D.

Definition at line 305 of file GLPixelBuffer.java.

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

◆ convert() [2/2]

static final GLPixelAttributes com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.convert ( final GLProfile  glp,
final PixelFormat  pixFmt,
final boolean  pack 
)
static

Returns the matching GLPixelAttributes for the given GLProfile, PixelFormat and pack if exists, otherwise returns null.

Parameters
glpthe corresponding GLProfile
pixFmtthe to be matched pixel format
packtrue for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D.

Definition at line 356 of file GLPixelBuffer.java.

Here is the call graph for this function:

◆ equals()

final boolean com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.equals ( final Object  obj)

Definition at line 455 of file GLPixelBuffer.java.

Here is the call graph for this function:

◆ getPixelFormat()

static final PixelFormat com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.getPixelFormat ( final int  glFormat,
final int  glDataType 
)
static

Returns the matching PixelFormat for the given GL format and type if exists, otherwise returns null.

Definition at line 235 of file GLPixelBuffer.java.

Here is the caller graph for this function:

◆ hashCode()

final int com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.hashCode ( )

Definition at line 447 of file GLPixelBuffer.java.

◆ toString()

String com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.toString ( )

Definition at line 520 of file GLPixelBuffer.java.

Member Data Documentation

◆ format

final int com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.format

The OpenGL pixel data format.

Definition at line 439 of file GLPixelBuffer.java.

◆ pfmt

final PixelFormat com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.pfmt

PixelFormat describing the component layout

Definition at line 444 of file GLPixelBuffer.java.

◆ type

final int com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.type

The OpenGL pixel data type

Definition at line 441 of file GLPixelBuffer.java.

◆ UNDEF

final GLPixelAttributes com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes.UNDEF = new GLPixelAttributes(null, PixelFormat.LUMINANCE, 0, 0, true, false)
static

Undefined instance of GLPixelAttributes, having componentCount:=0, format:=0 and type:= 0.

Definition at line 229 of file GLPixelBuffer.java.


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