RDTextureFormat¶
继承: RefCounted < Object
纹理格式(由RenderingDevice使用)。
描述¶
此对象由RenderingDevice使用。
属性¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
BitField[TextureUsageBits] |
|
|
|
方法¶
void |
add_shareable_format(format: DataFormat) |
void |
remove_shareable_format(format: DataFormat) |
属性说明¶
纹理中的层数。仅与2D纹理数组相关。
纹理的深度(以像素为单位)。对于2D纹理,这始终是1。
DataFormat format = 8 🔗
void set_format(value: DataFormat)
DataFormat get_format()
纹理的像素数据格式。
纹理的高度(以像素为单位)。
如果纹理是可丢弃的,则不需要在帧之间保留其内容。此标志仅在纹理用作绘制列表中的目标时才相关。
RenderingDevice使用此信息来确定是否可以丢弃纹理的内容,从而消除对内存的不必要写入并提高性能。
bool is_resolve_buffer = false 🔗
纹理将用作解析操作的目标。
纹理中可用的mipmap的数量。
TextureSamples samples = 0 🔗
void set_samples(value: TextureSamples)
TextureSamples get_samples()
对纹理进行采样时使用的样本数。
TextureType texture_type = 1 🔗
void set_texture_type(value: TextureType)
TextureType get_texture_type()
纹理类型。
BitField[TextureUsageBits] usage_bits = 0 🔗
void set_usage_bits(value: BitField[TextureUsageBits])
BitField[TextureUsageBits] get_usage_bits()
纹理的使用位,它决定了使用纹理可以做什么。
纹理的宽度(以像素为单位)。
方法说明¶
将format添加为对应的RDTextureView的RDTextureView.format_override属性的有效格式。如果任何格式添加为可共享,则还必须添加主format。
从有效格式列表中删除format,相应的RDTextureView的RDTextureView.format_override属性可以设置为这些格式。