|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<PixelFormat>
javax.media.nativewindow.util.PixelFormat
public enum PixelFormat
Basic pixel formats
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.
| Enum Constant Summary | |
|---|---|
ABGR8888
Pixel size is 4 bytes (32 bits) with each component of size 1 byte (8 bits). |
|
ARGB8888
Pixel size is 4 bytes (32 bits) with each component of size 1 byte (8 bits). |
|
BGR888
Pixel size is 3 bytes (24 bits) with each component of size 1 byte (8 bits). |
|
BGRA8888
Pixel size is 4 bytes (32 bits) with each component of size 1 byte (8 bits). |
|
LUMINANCE
Pixel size is 1 bytes (8 bits) with one component of size 1 byte (8 bits). |
|
RGB888
Pixel size is 3 bytes (24 bits) with each component of size 1 byte (8 bits). |
|
RGBA8888
Pixel size is 4 bytes (32 bits) with each component of size 1 byte (8 bits). |
|
| Field Summary | |
|---|---|
int |
bitsPerPixel
Number of bits per pixel, e.g. |
int |
componentCount
Number of components per pixel, e.g. |
| Method Summary | |
|---|---|
int |
bytesPerPixel()
Number of bytes per pixel, e.g. |
static PixelFormat |
valueOf(String name)
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, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final PixelFormat LUMINANCE
public static final PixelFormat RGB888
The components are interleaved in the order:
Compatible with:
public static final PixelFormat BGR888
The components are interleaved in the order:
Compatible with:
TYPE_3BYTE_BGR
public static final PixelFormat RGBA8888
The components are interleaved in the order:
Compatible with:
public static final PixelFormat ABGR8888
The components are interleaved in the order:
Compatible with:
TYPE_4BYTE_ABGR
public static final PixelFormat ARGB8888
The components are interleaved in the order:
Compatible with:
public static final PixelFormat BGRA8888
The components are interleaved in the order:
Compatible with:
TYPE_INT_ARGB
| Field Detail |
|---|
public final int componentCount
public final int bitsPerPixel
| Method Detail |
|---|
public static PixelFormat[] values()
for (PixelFormat c : PixelFormat.values()) System.out.println(c);
public static PixelFormat valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic final int bytesPerPixel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||