public static class GLPixelBuffer.GLPixelAttributes extends Object
Modifier and Type | Field and Description |
---|---|
int |
format
The OpenGL pixel data format
|
PixelFormat |
pfmt
PixelFormat describing the component layout |
int |
type
The OpenGL pixel data type
|
static GLPixelBuffer.GLPixelAttributes |
UNDEF
Undefined instance of
GLPixelBuffer.GLPixelAttributes , having componentCount:=0, format:=0 and type:= 0. |
Constructor and Description |
---|
GLPixelBuffer.GLPixelAttributes(GLProfile glp,
PixelFormat pixFmt,
boolean pack)
|
GLPixelBuffer.GLPixelAttributes(int dataFormat,
int dataType)
Create a new
GLPixelBuffer.GLPixelAttributes instance based on GL format and type. |
Modifier and Type | Method and Description |
---|---|
static GLPixelBuffer.GLPixelAttributes |
convert(GL gl,
int componentCount,
boolean pack)
Returns the matching
GLPixelBuffer.GLPixelAttributes for the given byte sized RGBA componentCount and GL if exists,
otherwise returns null . |
static GLPixelBuffer.GLPixelAttributes |
convert(GLProfile glp,
PixelFormat pixFmt,
boolean pack)
Returns the matching
GLPixelBuffer.GLPixelAttributes for the given GLProfile , PixelFormat and pack if exists,
otherwise returns null . |
boolean |
equals(Object obj) |
static PixelFormat |
getPixelFormat(int glFormat,
int glDataType)
Returns the matching
PixelFormat for the given GL format and type if exists,
otherwise returns null . |
int |
hashCode() |
String |
toString() |
public static final GLPixelBuffer.GLPixelAttributes UNDEF
GLPixelBuffer.GLPixelAttributes
, having componentCount:=0, format:=0 and type:= 0.public final int format
public final int type
public final PixelFormat pfmt
PixelFormat
describing the component
layoutpublic GLPixelBuffer.GLPixelAttributes(int dataFormat, int dataType) throws GLException
GLPixelBuffer.GLPixelAttributes
instance based on GL format and type.dataFormat
- GL data formatdataType
- GL data typeGLException
- if PixelFormat
could not be determined, see getPixelFormat(int, int)
.public GLPixelBuffer.GLPixelAttributes(GLProfile glp, PixelFormat pixFmt, boolean pack) throws GLException
glp
- the corresponding GLProfile
pixFmt
- the to be matched pixel format
pack
- true
for read mode GPU -> CPU, e.g. glReadPixels
.
false
for write mode CPU -> GPU, e.g. glTexImage2D
.GLException
- if GL format or type could not be determined, see convert(GLProfile, PixelFormat, boolean)
.public static final PixelFormat getPixelFormat(int glFormat, int glDataType)
PixelFormat
for the given GL format and type if exists,
otherwise returns null
.public static GLPixelBuffer.GLPixelAttributes convert(GL gl, int componentCount, boolean pack)
GLPixelBuffer.GLPixelAttributes
for the given byte sized RGBA componentCount
and GL
if exists,
otherwise returns null
.gl
- the corresponding current GL
context objectcomponentCount
- RGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)pack
- true
for read mode GPU -> CPU, e.g. glReadPixels
.
false
for write mode CPU -> GPU, e.g. glTexImage2D
.public static final GLPixelBuffer.GLPixelAttributes convert(GLProfile glp, PixelFormat pixFmt, boolean pack)
GLPixelBuffer.GLPixelAttributes
for the given GLProfile
, PixelFormat
and pack
if exists,
otherwise returns null
.glp
- the corresponding GLProfile
pixFmt
- the to be matched pixel format
pack
- true
for read mode GPU -> CPU, e.g. glReadPixels
.
false
for write mode CPU -> GPU, e.g. glTexImage2D
.Copyright 2010 JogAmp Community.