Enum PixelFormat
- All Implemented Interfaces:
Serializable
,Comparable<PixelFormat>
,java.lang.constant.Constable
Notation follows OpenGL notation, i.e. name consist of all it's component names followed by their bit size.
Order of component names is from lowest-bit to highest-bit.
In case component-size is 1 byte (e.g. OpenGL data-type GL_UNSIGNED_BYTE), component names are ordered from lowest-byte to highest-byte. Note that OpenGL applies special interpretation if data-type is e.g. GL_UNSIGNED_8_8_8_8_REV or GL_UNSIGNED_8_8_8_8_REV.
PixelFormat can be converted to OpenGL GLPixelAttributes via
GLPixelAttributes glpa = GLPixelAttributes.convert(PixelFormat pixFmt, GLProfile glp);
See OpenGL Specification 4.3 - February 14, 2013, Core Profile, Section 8.4.4 Transfer of Pixel Rectangles, p. 161-174.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Pixel composition, i.e.static enum
Component typesstatic class
Packed pixel composition, seePixelFormat.Composition
.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStride is 16 bits, 16 bits per pixel, 4discrete
components.Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.Stride is 16 bits, 16 bits per pixel, 3discrete
components.Stride is 24 bits, 24 bits per pixel, 3uniform
components of of 8 bits.Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.Stride is 32 bits, 24 bits per pixel, 3uniform
components of 8 bits.Stride is 8 bits, 8 bits per pixel, 1 component of 8 bits.Stride is 16 bits, 16 bits per pixel, 3discrete
components.Stride 24 bits, 24 bits per pixel, 3uniform
components of 8 bits.Stride is 16 bits, 16 bits per pixel, 4discrete
components.Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.Stride is 32 bits, 24 bits per pixel, 3uniform
components of 8 bits. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PixelFormat
Returns the unique matchingPixelFormat
of the givenPixelFormat.Composition
ornull
if none is available.static PixelFormat
Returns the enum constant of this type with the specified name.static PixelFormat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LUMINANCE
Stride is 8 bits, 8 bits per pixel, 1 component of 8 bits. Compatible with:- OpenGL: data-format GL_ALPHA (< GL3), GL_RED (>= GL3), data-type GL_UNSIGNED_BYTE
- AWT: none
-
RGB565
-
BGR565
-
RGBA5551
-
ABGR1555
-
RGB888
-
BGR888
Stride is 24 bits, 24 bits per pixel, 3uniform
components of of 8 bits.The
uniform
components
are interleaved in the order Low to High:- B: 0xFF << 0
- G: 0xFF << 8
- R: 0xFF << 16
Compatible with:
- OpenGL: data-format GL_BGR (>= GL2), data-type GL_UNSIGNED_BYTE
- AWT:
TYPE_3BYTE_BGR
-
RGBx8888
Stride is 32 bits, 24 bits per pixel, 3uniform
components of 8 bits.The
uniform
components
are interleaved in the order Low to High:- R: 0xFF << 0
- G: 0xFF << 8
- B: 0xFF << 16
Compatible with:
- OpenGL: data-format GL_RGBA, data-type GL_UNSIGNED_BYTE, with alpha discarded!
- AWT:
TYPE_INT_BGR
-
BGRx8888
Stride is 32 bits, 24 bits per pixel, 3uniform
components of 8 bits.The
uniform
components
are interleaved in the order Low to High:- B: 0xFF << 0
- G: 0xFF << 8
- R: 0xFF << 16
Compatible with:
- OpenGL: data-format GL_BGRA, data-type GL_UNSIGNED_BYTE - with alpha discarded!
- AWT:
TYPE_INT_RGB
-
RGBA8888
Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.The
uniform
components
are interleaved in the order Low to High:- R: 0xFF << 0
- G: 0xFF << 8
- B: 0xFF << 16
- A: 0xFF << 24
Compatible with:
- OpenGL: data-format GL_RGBA, data-type GL_UNSIGNED_BYTE
- AWT: None
- PointerIcon: OSX (NSBitmapImageRep)
- Window Icon: OSX (NSBitmapImageRep)
- PNGJ: Scanlines
-
ABGR8888
Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.The
uniform
components
are interleaved in the order Low to High:- A: 0xFF << 0
- B: 0xFF << 8
- G: 0xFF << 16
- R: 0xFF << 24
Compatible with:
- OpenGL: data-format GL_RGBA, data-type GL_UNSIGNED_INT_8_8_8_8
- AWT:
TYPE_4BYTE_ABGR
-
ARGB8888
-
BGRA8888
Stride is 32 bits, 32 bits per pixel, 4uniform
components of 8 bits.The
uniform
components
are interleaved in the order Low to High:- B: 0xFF << 0
- G: 0xFF << 8
- R: 0xFF << 16
- A: 0xFF << 24
Compatible with:
- OpenGL: data-format GL_BGRA, data-type GL_UNSIGNED_BYTE
- AWT:
TYPE_INT_ARGB
- PointerIcon: X11 (XCURSOR), Win32, AWT
- Window Icon: X11, Win32
-
-
Field Details
-
comp
UniquePixel Composition
, i.e. layout of its components.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Returns the unique matchingPixelFormat
of the givenPixelFormat.Composition
ornull
if none is available.
-