GpuTexture.java
com.mojang.blaze3d.textures.GpuTexture
信息
- 全限定名:com.mojang.blaze3d.textures.GpuTexture
- 类型:public abstract class
- 包:com.mojang.blaze3d.textures
- 源码路径:src/main/java/com/mojang/blaze3d/textures/GpuTexture.java
- 起始行号:L11
- 实现:AutoCloseable
- 职责:
TODO
字段/常量
-
USAGE_COPY_DST- 类型:
int - 修饰符:
public static final - 源码定位:
L12 - 说明:
TODO
- 类型:
-
USAGE_COPY_SRC- 类型:
int - 修饰符:
public static final - 源码定位:
L13 - 说明:
TODO
- 类型:
-
USAGE_TEXTURE_BINDING- 类型:
int - 修饰符:
public static final - 源码定位:
L14 - 说明:
TODO
- 类型:
-
USAGE_RENDER_ATTACHMENT- 类型:
int - 修饰符:
public static final - 源码定位:
L15 - 说明:
TODO
- 类型:
-
USAGE_CUBEMAP_COMPATIBLE- 类型:
int - 修饰符:
public static final - 源码定位:
L16 - 说明:
TODO
- 类型:
-
format- 类型:
TextureFormat - 修饰符:
private final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
width- 类型:
int - 修饰符:
private final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
height- 类型:
int - 修饰符:
private final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
depthOrLayers- 类型:
int - 修饰符:
private final - 源码定位:
L20 - 说明:
TODO
- 类型:
-
mipLevels- 类型:
int - 修饰符:
private final - 源码定位:
L21 - 说明:
TODO
- 类型:
-
usage- 类型:
int - 修饰符:
private final - 源码定位:
L22 - 说明:
TODO
- 类型:
-
label- 类型:
String - 修饰符:
private final - 源码定位:
L24 - 说明:
TODO
- 类型:
内部类/嵌套类型
com.mojang.blaze3d.textures.GpuTexture.Usage- 类型:
annotation - 修饰符:
public - 源码定位:
L73 - 说明:
TODO
- 类型:
构造器
public GpuTexture(int usage, String label, TextureFormat format, int width, int height, int depthOrLayers, int mipLevels) @ L26
- 构造器名:GpuTexture
- 源码定位:L26
- 修饰符:public
参数:
- usage: int
- label: String
- format: TextureFormat
- width: int
- height: int
- depthOrLayers: int
- mipLevels: int
说明:
TODO
方法
下面的方法块按源码顺序生成。
public int getWidth(int mipLevel) @ L36
- 方法名:getWidth
- 源码定位:L36
- 返回类型:int
- 修饰符:public
参数:
- mipLevel: int
说明:
TODO
public int getHeight(int mipLevel) @ L40
- 方法名:getHeight
- 源码定位:L40
- 返回类型:int
- 修饰符:public
参数:
- mipLevel: int
说明:
TODO
public int getDepthOrLayers() @ L44
- 方法名:getDepthOrLayers
- 源码定位:L44
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
public int getMipLevels() @ L48
- 方法名:getMipLevels
- 源码定位:L48
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
public TextureFormat getFormat() @ L52
- 方法名:getFormat
- 源码定位:L52
- 返回类型:TextureFormat
- 修饰符:public
参数:
- 无
说明:
TODO
public int usage() @ L56
- 方法名:usage
- 源码定位:L56
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
public String getLabel() @ L61
- 方法名:getLabel
- 源码定位:L61
- 返回类型:String
- 修饰符:public
参数:
- 无
说明:
TODO
public abstract void close() @ L65
- 方法名:close
- 源码定位:L65
- 返回类型:void
- 修饰符:public abstract
参数:
- 无
说明:
TODO
public abstract boolean isClosed() @ L68
- 方法名:isClosed
- 源码定位:L68
- 返回类型:boolean
- 修饰符:public abstract
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public abstract class GpuTexture implements AutoCloseable {
public static final int USAGE_COPY_DST = 1;
public static final int USAGE_COPY_SRC = 2;
public static final int USAGE_TEXTURE_BINDING = 4;
public static final int USAGE_RENDER_ATTACHMENT = 8;
public static final int USAGE_CUBEMAP_COMPATIBLE = 16;
private final TextureFormat format;
private final int width;
private final int height;
private final int depthOrLayers;
private final int mipLevels;
@GpuTexture.Usage
private final int usage;
private final String label;
public GpuTexture(@GpuTexture.Usage int usage, String label, TextureFormat format, int width, int height, int depthOrLayers, int mipLevels) {
this.usage = usage;
this.label = label;
this.format = format;
this.width = width;
this.height = height;
this.depthOrLayers = depthOrLayers;
this.mipLevels = mipLevels;
}
public int getWidth(int mipLevel) {
return this.width >> mipLevel;
}
public int getHeight(int mipLevel) {
return this.height >> mipLevel;
}
public int getDepthOrLayers() {
return this.depthOrLayers;
}
public int getMipLevels() {
return this.mipLevels;
}
public TextureFormat getFormat() {
return this.format;
}
@GpuTexture.Usage
public int usage() {
return this.usage;
}
public String getLabel() {
return this.label;
}
@Override
public abstract void close();
public abstract boolean isClosed();
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.TYPE_USE})
@OnlyIn(Dist.CLIENT)
public @interface Usage {
}
}引用的其他类
- TextureFormat
- 引用位置:
参数/字段/返回值
- 引用位置: