TextureFormat.java
com.mojang.blaze3d.textures.TextureFormat
信息
- 全限定名:com.mojang.blaze3d.textures.TextureFormat
- 类型:public enum
- 包:com.mojang.blaze3d.textures
- 源码路径:src/main/java/com/mojang/blaze3d/textures/TextureFormat.java
- 起始行号:L7
- 职责:
TODO
字段/常量
-
RGBA8, RED8, RED8I, DEPTH32- 类型:
TextureFormat - 修饰符:
package-private - 源码定位:
L8 - 说明:
TODO
- 类型:
-
pixelSize- 类型:
int - 修饰符:
private final - 源码定位:
L13 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
private TextureFormat(int pixelSize) @ L15
- 构造器名:TextureFormat
- 源码定位:L15
- 修饰符:private
参数:
- pixelSize: int
说明:
TODO
方法
下面的方法块按源码顺序生成。
public int pixelSize() @ L19
- 方法名:pixelSize
- 源码定位:L19
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
public boolean hasColorAspect() @ L23
- 方法名:hasColorAspect
- 源码定位:L23
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
public boolean hasDepthAspect() @ L27
- 方法名:hasDepthAspect
- 源码定位:L27
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public enum TextureFormat {
RGBA8(4),
RED8(1),
RED8I(1),
DEPTH32(4);
private final int pixelSize;
private TextureFormat(int pixelSize) {
this.pixelSize = pixelSize;
}
public int pixelSize() {
return this.pixelSize;
}
public boolean hasColorAspect() {
return this == RGBA8 || this == RED8;
}
public boolean hasDepthAspect() {
return this == DEPTH32;
}
}引用的其他类
- 无