Table of Contents

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

int

Remarks

  • void set_array_layers(int value)
  • int get_array_layers

depth

The texture's depth (in pixels). This is always 1 for 2D textures.

var depth : int = 1

Property Value

int

Remarks

  • void set_depth(int value)
  • int get_depth

format

The texture's pixel data format.

var format : int = 8

Property Value

int

Remarks

  • void set_format(int value)
  • int get_format

height

The texture's height (in pixels).

var height : int = 1

Property Value

int

Remarks

  • void set_height(int value)
  • int get_height

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

bool

Remarks

  • void set_is_discardable(bool value)
  • bool get_is_discardable

is_resolve_buffer

The texture will be used as the destination of a resolve operation.

var is_resolve_buffer : bool = false

Property Value

bool

Remarks

  • void set_is_resolve_buffer(bool value)
  • bool get_is_resolve_buffer

mipmaps

The number of mipmaps available in the texture.

var mipmaps : int = 1

Property Value

int

Remarks

  • void set_mipmaps(int value)
  • int get_mipmaps

samples

The number of samples used when sampling the texture.

var samples : int = 0

Property Value

int

Remarks

  • void set_samples(int value)
  • int get_samples

texture_type

The texture type.

var texture_type : int = 1

Property Value

int

Remarks

  • void set_texture_type(int value)
  • int get_texture_type

usage_bits

The texture's usage bits, which determine what can be done using the texture.

var usage_bits : int = 0

Property Value

int

Remarks

  • void set_usage_bits(int value)
  • int get_usage_bits

width

The texture's width (in pixels).

var width : int = 1

Property Value

int

Remarks

  • void set_width(int value)
  • int get_width

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