Class reference
RDTextureFormat
Inherits RefCounted
Texture format (used by RenderingDevice).
Description
This object is used by RenderingDevice.
Properties
int array_layers = 1
int array_layers = 1The number of layers in the texture. Only relevant for 2D texture arrays.
int depth = 1
int depth = 1The texture's depth (in pixels). This is always 1 for 2D textures.
int format = 8
int format = 8The texture's pixel data format.
int height = 1
int height = 1The texture's height (in pixels).
bool is_discardable = false
bool is_discardable = falseIf 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
bool is_resolve_buffer = falseThe texture will be used as the destination of a resolve operation.
int mipmaps = 1
int mipmaps = 1The number of mipmaps available in the texture.
int samples = 0
int samples = 0The number of samples used when sampling the texture.
int texture_type = 1
int texture_type = 1The texture type.
int usage_bits = 0
int usage_bits = 0The texture's usage bits, which determine what can be done using the texture.
int width = 1
int width = 1The texture's width (in pixels).
Methods
void add_shareable_format(int format)
int format)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.
void remove_shareable_format(int format)
int format)Removes format from the list of valid formats that the corresponding RDTextureView's RDTextureView.format_override property can be set to.