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