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