Package net.minecraft.client.texture
Enum NativeImage.Format
- All Implemented Interfaces:
Serializable
,Comparable<NativeImage.Format>
,java.lang.constant.Constable
- Enclosing class:
- NativeImage
@Environment(CLIENT) public static enum NativeImage.Format extends Enum<NativeImage.Format>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description ABGR
BGR
LUMINANCE
LUMINANCE_ALPHA
-
Field Summary
Fields Modifier and Type Field Description private int
alphaChannelOffset
private int
blueOffset
private int
channelCount
private int
greenOffset
private boolean
hasAlpha
private boolean
hasBlue
private boolean
hasGreen
private boolean
hasLuminance
private boolean
hasRed
private int
luminanceChannelOffset
private int
pixelDataFormat
private int
redOffset
private boolean
writeable
-
Constructor Summary
Constructors Modifier Constructor Description private
Format(int channels, int glFormat, boolean hasRed, boolean hasGreen, boolean hasBlue, boolean hasLuminance, boolean hasAlpha, int redOffset, int greenOffset, int blueOffset, int luminanceOffset, int alphaOffset, boolean writeable)
-
Method Summary
Modifier and Type Method Description int
getAlphaChannelOffset()
int
getChannelCount()
private static NativeImage.Format
getFormat(int glFormat)
int
getOpacityOffset()
int
getPixelDataFormat()
boolean
hasAlphaChannel()
boolean
hasOpacityChannel()
boolean
isWriteable()
void
setPackAlignment()
void
setUnpackAlignment()
static NativeImage.Format
valueOf(String name)
Returns the enum constant of this type with the specified name.static NativeImage.Format[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ABGR
-
BGR
-
LUMINANCE_ALPHA
-
LUMINANCE
-
-
Field Details
-
channelCount
private final int channelCount -
pixelDataFormat
private final int pixelDataFormat -
hasRed
private final boolean hasRed -
hasGreen
private final boolean hasGreen -
hasBlue
private final boolean hasBlue -
hasLuminance
private final boolean hasLuminance -
hasAlpha
private final boolean hasAlpha -
redOffset
private final int redOffset -
greenOffset
private final int greenOffset -
blueOffset
private final int blueOffset -
luminanceChannelOffset
private final int luminanceChannelOffset -
alphaChannelOffset
private final int alphaChannelOffset -
writeable
private final boolean writeable
-
-
Constructor Details
-
Format
private Format(int channels, int glFormat, boolean hasRed, boolean hasGreen, boolean hasBlue, boolean hasLuminance, boolean hasAlpha, int redOffset, int greenOffset, int blueOffset, int luminanceOffset, int alphaOffset, boolean writeable)
-
-
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
-
getChannelCount
public int getChannelCount() -
setPackAlignment
public void setPackAlignment() -
setUnpackAlignment
public void setUnpackAlignment() -
getPixelDataFormat
public int getPixelDataFormat() -
hasAlphaChannel
public boolean hasAlphaChannel() -
getAlphaChannelOffset
public int getAlphaChannelOffset() -
hasOpacityChannel
public boolean hasOpacityChannel() -
getOpacityOffset
public int getOpacityOffset() -
isWriteable
public boolean isWriteable() -
getFormat
-