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()
紋理的圖元資料格式。
紋理的高度(單位為圖元)。
If a texture is discardable, its contents do not need to be preserved between frames. This flag is only relevant when the texture is used as target in a draw list.
This information is used by RenderingDevice to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance.
bool is_resolve_buffer = false 🔗
The texture will be used as the destination of a resolve operation.
紋理中可用的 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()
紋理的用途位,決定使用該紋理時能做什麼。
紋理的寬度(單位為圖元)。
方法說明
Adds format as a valid format for the corresponding RDTextureView's RDTextureView.format_override property. If any format is added as shareable, then the main format must also be added.
Removes format from the list of valid formats that the corresponding RDTextureView's RDTextureView.format_override property can be set to.