RenderingDevice

Inherits:Object

Abstraction for working with modern low-level graphics APIs.

Description

RenderingDevice is an abstraction for working with modern low-level graphics APIs such as Vulkan. Compared toRenderingServer (which works with Godot's own rendering subsystems),RenderingDevice is much lower-level and allows working more directly with the underlying graphics APIs.RenderingDevice is used in Godot to provide support for several modern low-level graphics APIs while reducing the amount of code duplication required.RenderingDevice can also be used in your own projects to perform things that are not exposed byRenderingServer or high-level nodes, such as using compute shaders.

On startup, Godot creates a globalRenderingDevice which can be retrieved usingRenderingServer.get_rendering_device(). This globalRenderingDevice performs drawing to the screen.

Local RenderingDevices: UsingRenderingServer.create_local_rendering_device(), you can create "secondary" rendering devices to perform drawing and GPU compute operations on separate threads.

Note:RenderingDevice assumes intermediate knowledge of modern graphics APIs such as Vulkan, Direct3D 12, Metal or WebGPU. These graphics APIs are lower-level than OpenGL or Direct3D 11, requiring you to perform what was previously done by the graphics driver itself. If you have difficulty understanding the concepts used in this class, follow theVulkan Tutorial orVulkan Guide. It's recommended to have existing modern OpenGL or Direct3D 11 knowledge before attempting to learn a low-level graphics API.

Note:RenderingDevice is not available when running in headless mode or when using the Compatibility rendering method.

Tutorials

Methods

void

barrier(from:BitField[BarrierMask] = 32767, to:BitField[BarrierMask] = 32767)

Error

buffer_clear(buffer:RID, offset:int, size_bytes:int)

Error

buffer_copy(src_buffer:RID, dst_buffer:RID, src_offset:int, dst_offset:int, size:int)

PackedByteArray

buffer_get_data(buffer:RID, offset_bytes:int = 0, size_bytes:int = 0)

Error

buffer_get_data_async(buffer:RID, callback:Callable, offset_bytes:int = 0, size_bytes:int = 0)

int

buffer_get_device_address(buffer:RID)

Error

buffer_update(buffer:RID, offset:int, size_bytes:int, data:PackedByteArray)

void

capture_timestamp(name:String)

void

compute_list_add_barrier(compute_list:int)

int

compute_list_begin()

void

compute_list_bind_compute_pipeline(compute_list:int, compute_pipeline:RID)

void

compute_list_bind_uniform_set(compute_list:int, uniform_set:RID, set_index:int)

void

compute_list_dispatch(compute_list:int, x_groups:int, y_groups:int, z_groups:int)

void

compute_list_dispatch_indirect(compute_list:int, buffer:RID, offset:int)

void

compute_list_end()

void

compute_list_set_push_constant(compute_list:int, buffer:PackedByteArray, size_bytes:int)

RID

compute_pipeline_create(shader:RID, specialization_constants:Array[RDPipelineSpecializationConstant] = [])

bool

compute_pipeline_is_valid(compute_pipeline:RID)

RenderingDevice

create_local_device()

void

draw_command_begin_label(name:String, color:Color)

void

draw_command_end_label()

void

draw_command_insert_label(name:String, color:Color)

int

draw_list_begin(framebuffer:RID, draw_flags:BitField[DrawFlags] = 0, clear_color_values:PackedColorArray = PackedColorArray(), clear_depth_value:float = 1.0, clear_stencil_value:int = 0, region:Rect2 = Rect2(0, 0, 0, 0), breadcrumb:int = 0)

int

draw_list_begin_for_screen(screen:int = 0, clear_color:Color = Color(0, 0, 0, 1))

PackedInt64Array

draw_list_begin_split(framebuffer:RID, splits:int, initial_color_action:InitialAction, final_color_action:FinalAction, initial_depth_action:InitialAction, final_depth_action:FinalAction, clear_color_values:PackedColorArray = PackedColorArray(), clear_depth:float = 1.0, clear_stencil:int = 0, region:Rect2 = Rect2(0, 0, 0, 0), storage_textures:Array[RID] = [])

void

draw_list_bind_index_array(draw_list:int, index_array:RID)

void

draw_list_bind_render_pipeline(draw_list:int, render_pipeline:RID)

void

draw_list_bind_uniform_set(draw_list:int, uniform_set:RID, set_index:int)

void

draw_list_bind_vertex_array(draw_list:int, vertex_array:RID)

void

draw_list_disable_scissor(draw_list:int)

void

draw_list_draw(draw_list:int, use_indices:bool, instances:int, procedural_vertex_count:int = 0)

void

draw_list_draw_indirect(draw_list:int, use_indices:bool, buffer:RID, offset:int = 0, draw_count:int = 1, stride:int = 0)

void

draw_list_enable_scissor(draw_list:int, rect:Rect2 = Rect2(0, 0, 0, 0))

void

draw_list_end()

void

draw_list_set_blend_constants(draw_list:int, color:Color)

void

draw_list_set_push_constant(draw_list:int, buffer:PackedByteArray, size_bytes:int)

int

draw_list_switch_to_next_pass()

PackedInt64Array

draw_list_switch_to_next_pass_split(splits:int)

RID

framebuffer_create(textures:Array[RID], validate_with_format:int = -1, view_count:int = 1)

RID

framebuffer_create_empty(size:Vector2i, samples:TextureSamples = 0, validate_with_format:int = -1)

RID

framebuffer_create_multipass(textures:Array[RID], passes:Array[RDFramebufferPass], validate_with_format:int = -1, view_count:int = 1)

int

framebuffer_format_create(attachments:Array[RDAttachmentFormat], view_count:int = 1)

int

framebuffer_format_create_empty(samples:TextureSamples = 0)

int

framebuffer_format_create_multipass(attachments:Array[RDAttachmentFormat], passes:Array[RDFramebufferPass], view_count:int = 1)

TextureSamples

framebuffer_format_get_texture_samples(format:int, render_pass:int = 0)

int

framebuffer_get_format(framebuffer:RID)

bool

framebuffer_is_valid(framebuffer:RID)const

void

free_rid(rid:RID)

void

full_barrier()

int

get_captured_timestamp_cpu_time(index:int)const

int

get_captured_timestamp_gpu_time(index:int)const

String

get_captured_timestamp_name(index:int)const

int

get_captured_timestamps_count()const

int

get_captured_timestamps_frame()const

int

get_device_allocation_count()const

int

get_device_allocs_by_object_type(type:int)const

int

get_device_memory_by_object_type(type:int)const

String

get_device_name()const

String

get_device_pipeline_cache_uuid()const

int

get_device_total_memory()const

String

get_device_vendor_name()const

int

get_driver_allocation_count()const

int

get_driver_allocs_by_object_type(type:int)const

String

get_driver_and_device_memory_report()const

int

get_driver_memory_by_object_type(type:int)const

int

get_driver_resource(resource:DriverResource, rid:RID, index:int)

int

get_driver_total_memory()const

int

get_frame_delay()const

int

get_memory_usage(type:MemoryType)const

String

get_perf_report()const

String

get_tracked_object_name(type_index:int)const

int

get_tracked_object_type_count()const

bool

has_feature(feature:Features)const

RID

index_array_create(index_buffer:RID, index_offset:int, index_count:int)

RID

index_buffer_create(size_indices:int, format:IndexBufferFormat, data:PackedByteArray = PackedByteArray(), use_restart_indices:bool = false, creation_bits:BitField[BufferCreationBits] = 0)

int

limit_get(limit:Limit)const

RID

render_pipeline_create(shader:RID, framebuffer_format:int, vertex_format:int, primitive:RenderPrimitive, rasterization_state:RDPipelineRasterizationState, multisample_state:RDPipelineMultisampleState, stencil_state:RDPipelineDepthStencilState, color_blend_state:RDPipelineColorBlendState, dynamic_state_flags:BitField[PipelineDynamicStateFlags] = 0, for_render_pass:int = 0, specialization_constants:Array[RDPipelineSpecializationConstant] = [])

bool

render_pipeline_is_valid(render_pipeline:RID)

RID

sampler_create(state:RDSamplerState)

bool

sampler_is_format_supported_for_filter(format:DataFormat, sampler_filter:SamplerFilter)const

int

screen_get_framebuffer_format(screen:int = 0)const

int

screen_get_height(screen:int = 0)const

int

screen_get_width(screen:int = 0)const

void

set_resource_name(id:RID, name:String)

PackedByteArray

shader_compile_binary_from_spirv(spirv_data:RDShaderSPIRV, name:String = "")

RDShaderSPIRV

shader_compile_spirv_from_source(shader_source:RDShaderSource, allow_cache:bool = true)

RID

shader_create_from_bytecode(binary_data:PackedByteArray, placeholder_rid:RID = RID())

RID

shader_create_from_spirv(spirv_data:RDShaderSPIRV, name:String = "")

RID

shader_create_placeholder()

int

shader_get_vertex_input_attribute_mask(shader:RID)

RID

storage_buffer_create(size_bytes:int, data:PackedByteArray = PackedByteArray(), usage:BitField[StorageBufferUsage] = 0, creation_bits:BitField[BufferCreationBits] = 0)

void

submit()

void

sync()

RID

texture_buffer_create(size_bytes:int, format:DataFormat, data:PackedByteArray = PackedByteArray())

Error

texture_clear(texture:RID, color:Color, base_mipmap:int, mipmap_count:int, base_layer:int, layer_count:int)

Error

texture_copy(from_texture:RID, to_texture:RID, from_pos:Vector3, to_pos:Vector3, size:Vector3, src_mipmap:int, dst_mipmap:int, src_layer:int, dst_layer:int)

RID

texture_create(format:RDTextureFormat, view:RDTextureView, data:Array[PackedByteArray] = [])

RID

texture_create_from_extension(type:TextureType, format:DataFormat, samples:TextureSamples, usage_flags:BitField[TextureUsageBits], image:int, width:int, height:int, depth:int, layers:int)

RID

texture_create_shared(view:RDTextureView, with_texture:RID)

RID

texture_create_shared_from_slice(view:RDTextureView, with_texture:RID, layer:int, mipmap:int, mipmaps:int = 1, slice_type:TextureSliceType = 0)

PackedByteArray

texture_get_data(texture:RID, layer:int)

Error

texture_get_data_async(texture:RID, layer:int, callback:Callable)

RDTextureFormat

texture_get_format(texture:RID)

int

texture_get_native_handle(texture:RID)

bool

texture_is_discardable(texture:RID)

bool

texture_is_format_supported_for_usage(format:DataFormat, usage_flags:BitField[TextureUsageBits])const

bool

texture_is_shared(texture:RID)

bool

texture_is_valid(texture:RID)

Error

texture_resolve_multisample(from_texture:RID, to_texture:RID)

void

texture_set_discardable(texture:RID, discardable:bool)

Error

texture_update(texture:RID, layer:int, data:PackedByteArray)

RID

uniform_buffer_create(size_bytes:int, data:PackedByteArray = PackedByteArray(), creation_bits:BitField[BufferCreationBits] = 0)

RID

uniform_set_create(uniforms:Array[RDUniform], shader:RID, shader_set:int)

bool

uniform_set_is_valid(uniform_set:RID)

RID

vertex_array_create(vertex_count:int, vertex_format:int, src_buffers:Array[RID], offsets:PackedInt64Array = PackedInt64Array())

RID

vertex_buffer_create(size_bytes:int, data:PackedByteArray = PackedByteArray(), creation_bits:BitField[BufferCreationBits] = 0)

int

vertex_format_create(vertex_descriptions:Array[RDVertexAttribute])


Enumerations

enumDeviceType:🔗

DeviceTypeDEVICE_TYPE_OTHER =0

Rendering device type does not match any of the other enum values or is unknown.

DeviceTypeDEVICE_TYPE_INTEGRATED_GPU =1

Rendering device is an integrated GPU, which is typically(but not always) slower than dedicated GPUs (DEVICE_TYPE_DISCRETE_GPU). On Android and iOS, the rendering device type is always considered to beDEVICE_TYPE_INTEGRATED_GPU.

DeviceTypeDEVICE_TYPE_DISCRETE_GPU =2

Rendering device is a dedicated GPU, which is typically(but not always) faster than integrated GPUs (DEVICE_TYPE_INTEGRATED_GPU).

DeviceTypeDEVICE_TYPE_VIRTUAL_GPU =3

Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent toDEVICE_TYPE_INTEGRATED_GPU. Virtual machine GPU passthrough (such as VFIO) will not report the device type asDEVICE_TYPE_VIRTUAL_GPU. Instead, the host GPU's device type will be reported as if the GPU was not emulated.

DeviceTypeDEVICE_TYPE_CPU =4

Rendering device is provided by software emulation (such as Lavapipe orSwiftShader). This is the slowest kind of rendering device available; it's typically much slower thanDEVICE_TYPE_INTEGRATED_GPU.

DeviceTypeDEVICE_TYPE_MAX =5

Represents the size of theDeviceType enum.


enumDriverResource:🔗

DriverResourceDRIVER_RESOURCE_LOGICAL_DEVICE =0

Specific device object based on a physical device.

  • Vulkan: Vulkan device driver resource (VkDevice). (rid argument doesn't apply.)

DriverResourceDRIVER_RESOURCE_PHYSICAL_DEVICE =1

Physical device the specific logical device is based on.

  • Vulkan:VkDevice. (rid argument doesn't apply.)

DriverResourceDRIVER_RESOURCE_TOPMOST_OBJECT =2

Top-most graphics API entry object.

  • Vulkan:VkInstance. (rid argument doesn't apply.)

DriverResourceDRIVER_RESOURCE_COMMAND_QUEUE =3

The main graphics-compute command queue.

  • Vulkan:VkQueue. (rid argument doesn't apply.)

DriverResourceDRIVER_RESOURCE_QUEUE_FAMILY =4

The specific family the main queue belongs to.

  • Vulkan: the queue family index, anuint32_t. (rid argument doesn't apply.)

DriverResourceDRIVER_RESOURCE_TEXTURE =5

  • Vulkan:VkImage.

DriverResourceDRIVER_RESOURCE_TEXTURE_VIEW =6

The view of an owned or shared texture.

  • Vulkan:VkImageView.

DriverResourceDRIVER_RESOURCE_TEXTURE_DATA_FORMAT =7

The native id of the data format of the texture.

  • Vulkan:VkFormat.

DriverResourceDRIVER_RESOURCE_SAMPLER =8

  • Vulkan:VkSampler.

DriverResourceDRIVER_RESOURCE_UNIFORM_SET =9

  • Vulkan:VkDescriptorSet.

DriverResourceDRIVER_RESOURCE_BUFFER =10

Buffer of any kind of (storage, vertex, etc.).

  • Vulkan:VkBuffer.

DriverResourceDRIVER_RESOURCE_COMPUTE_PIPELINE =11

  • Vulkan:VkPipeline.

DriverResourceDRIVER_RESOURCE_RENDER_PIPELINE =12

  • Vulkan:VkPipeline.

DriverResourceDRIVER_RESOURCE_VULKAN_DEVICE =0

Deprecated: UseDRIVER_RESOURCE_LOGICAL_DEVICE instead.

DriverResourceDRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE =1

Deprecated: UseDRIVER_RESOURCE_PHYSICAL_DEVICE instead.

DriverResourceDRIVER_RESOURCE_VULKAN_INSTANCE =2

Deprecated: UseDRIVER_RESOURCE_TOPMOST_OBJECT instead.

DriverResourceDRIVER_RESOURCE_VULKAN_QUEUE =3

Deprecated: UseDRIVER_RESOURCE_COMMAND_QUEUE instead.

DriverResourceDRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX =4

Deprecated: UseDRIVER_RESOURCE_QUEUE_FAMILY instead.

DriverResourceDRIVER_RESOURCE_VULKAN_IMAGE =5

Deprecated: UseDRIVER_RESOURCE_TEXTURE instead.

DriverResourceDRIVER_RESOURCE_VULKAN_IMAGE_VIEW =6

Deprecated: UseDRIVER_RESOURCE_TEXTURE_VIEW instead.

DriverResourceDRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT =7

Deprecated: UseDRIVER_RESOURCE_TEXTURE_DATA_FORMAT instead.

DriverResourceDRIVER_RESOURCE_VULKAN_SAMPLER =8

Deprecated: UseDRIVER_RESOURCE_SAMPLER instead.

DriverResourceDRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET =9

Deprecated: UseDRIVER_RESOURCE_UNIFORM_SET instead.

DriverResourceDRIVER_RESOURCE_VULKAN_BUFFER =10

Deprecated: UseDRIVER_RESOURCE_BUFFER instead.

DriverResourceDRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE =11

Deprecated: UseDRIVER_RESOURCE_COMPUTE_PIPELINE instead.

DriverResourceDRIVER_RESOURCE_VULKAN_RENDER_PIPELINE =12

Deprecated: UseDRIVER_RESOURCE_RENDER_PIPELINE instead.


enumDataFormat:🔗

DataFormatDATA_FORMAT_R4G4_UNORM_PACK8 =0

4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the[0.0,1.0] range.

Note: More information on all data formats can be found on theIdentification of formats section of the Vulkan specification, as well as theVkFormat enum.

DataFormatDATA_FORMAT_R4G4B4A4_UNORM_PACK16 =1

4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B4G4R4A4_UNORM_PACK16 =2

4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R5G6B5_UNORM_PACK16 =3

Red/green/blue channel data format with 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B5G6R5_UNORM_PACK16 =4

Blue/green/red channel data format with 5 bits of blue, 6 bits of green and 5 bits of red, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R5G5B5A1_UNORM_PACK16 =5

Red/green/blue/alpha channel data format with 5 bits of red, 6 bits of green, 5 bits of blue and 1 bit of alpha, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B5G5R5A1_UNORM_PACK16 =6

Blue/green/red/alpha channel data format with 5 bits of blue, 6 bits of green, 5 bits of red and 1 bit of alpha, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_A1R5G5B5_UNORM_PACK16 =7

Alpha/red/green/blue channel data format with 1 bit of alpha, 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8_UNORM =8

8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8_SNORM =9

8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R8_USCALED =10

8-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_R8_SSCALED =11

8-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_R8_UINT =12

8-bit-per-channel unsigned integer red channel data format. Values are in the[0,255] range.

DataFormatDATA_FORMAT_R8_SINT =13

8-bit-per-channel signed integer red channel data format. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_R8_SRGB =14

8-bit-per-channel unsigned floating-point red channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8G8_UNORM =15

8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8G8_SNORM =16

8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R8G8_USCALED =17

8-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_R8G8_SSCALED =18

8-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_R8G8_UINT =19

8-bit-per-channel unsigned integer red/green channel data format. Values are in the[0,255] range.

DataFormatDATA_FORMAT_R8G8_SINT =20

8-bit-per-channel signed integer red/green channel data format. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_R8G8_SRGB =21

8-bit-per-channel unsigned floating-point red/green channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8G8B8_UNORM =22

8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8G8B8_SNORM =23

8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R8G8B8_USCALED =24

8-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_R8G8B8_SSCALED =25

8-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_R8G8B8_UINT =26

8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the[0,255] range.

DataFormatDATA_FORMAT_R8G8B8_SINT =27

8-bit-per-channel signed integer red/green/blue channel data format. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_R8G8B8_SRGB =28

8-bit-per-channel unsigned floating-point red/green/blue/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B8G8R8_UNORM =29

8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B8G8R8_SNORM =30

8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_B8G8R8_USCALED =31

8-bit-per-channel unsigned floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_B8G8R8_SSCALED =32

8-bit-per-channel signed floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_B8G8R8_UINT =33

8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the[0,255] range.

DataFormatDATA_FORMAT_B8G8R8_SINT =34

8-bit-per-channel signed integer blue/green/red channel data format. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_B8G8R8_SRGB =35

8-bit-per-channel unsigned floating-point blue/green/red data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8G8B8A8_UNORM =36

8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R8G8B8A8_SNORM =37

8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R8G8B8A8_USCALED =38

8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_R8G8B8A8_SSCALED =39

8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_R8G8B8A8_UINT =40

8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the[0,255] range.

DataFormatDATA_FORMAT_R8G8B8A8_SINT =41

8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_R8G8B8A8_SRGB =42

8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B8G8R8A8_UNORM =43

8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_B8G8R8A8_SNORM =44

8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_B8G8R8A8_USCALED =45

8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_B8G8R8A8_SSCALED =46

8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_B8G8R8A8_UINT =47

8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the[0,255] range.

DataFormatDATA_FORMAT_B8G8R8A8_SINT =48

8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_B8G8R8A8_SRGB =49

8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_A8B8G8R8_UNORM_PACK32 =50

8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_A8B8G8R8_SNORM_PACK32 =51

8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_A8B8G8R8_USCALED_PACK32 =52

8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the[0.0,255.0] range.

DataFormatDATA_FORMAT_A8B8G8R8_SSCALED_PACK32 =53

8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the[-127.0,127.0] range.

DataFormatDATA_FORMAT_A8B8G8R8_UINT_PACK32 =54

8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the[0,255] range.

DataFormatDATA_FORMAT_A8B8G8R8_SINT_PACK32 =55

8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the[-127,127] range.

DataFormatDATA_FORMAT_A8B8G8R8_SRGB_PACK32 =56

8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value and non-linear sRGB encoding, packed in 32 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_A2R10G10B10_UNORM_PACK32 =57

Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_A2R10G10B10_SNORM_PACK32 =58

Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_A2R10G10B10_USCALED_PACK32 =59

Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the[0.0,1023.0] range for red/green/blue and[0.0,3.0] for alpha.

DataFormatDATA_FORMAT_A2R10G10B10_SSCALED_PACK32 =60

Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the[-511.0,511.0] range for red/green/blue and[-1.0,1.0] for alpha.

DataFormatDATA_FORMAT_A2R10G10B10_UINT_PACK32 =61

Unsigned integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the[0,1023] range for red/green/blue and[0,3] for alpha.

DataFormatDATA_FORMAT_A2R10G10B10_SINT_PACK32 =62

Signed integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the[-511,511] range for red/green/blue and[-1,1] for alpha.

DataFormatDATA_FORMAT_A2B10G10R10_UNORM_PACK32 =63

Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_A2B10G10R10_SNORM_PACK32 =64

Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_A2B10G10R10_USCALED_PACK32 =65

Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the[0.0,1023.0] range for blue/green/red and[0.0,3.0] for alpha.

DataFormatDATA_FORMAT_A2B10G10R10_SSCALED_PACK32 =66

Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the[-511.0,511.0] range for blue/green/red and[-1.0,1.0] for alpha.

DataFormatDATA_FORMAT_A2B10G10R10_UINT_PACK32 =67

Unsigned integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the[0,1023] range for blue/green/red and[0,3] for alpha.

DataFormatDATA_FORMAT_A2B10G10R10_SINT_PACK32 =68

Signed integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the[-511,511] range for blue/green/red and[-1,1] for alpha.

DataFormatDATA_FORMAT_R16_UNORM =69

16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R16_SNORM =70

16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R16_USCALED =71

16-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,65535.0] range.

DataFormatDATA_FORMAT_R16_SSCALED =72

16-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the[-32767.0,32767.0] range.

DataFormatDATA_FORMAT_R16_UINT =73

16-bit-per-channel unsigned integer red channel data format. Values are in the[0.0,65535] range.

DataFormatDATA_FORMAT_R16_SINT =74

16-bit-per-channel signed integer red channel data format. Values are in the[-32767,32767] range.

DataFormatDATA_FORMAT_R16_SFLOAT =75

16-bit-per-channel signed floating-point red channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R16G16_UNORM =76

16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R16G16_SNORM =77

16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R16G16_USCALED =78

16-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,65535.0] range.

DataFormatDATA_FORMAT_R16G16_SSCALED =79

16-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the[-32767.0,32767.0] range.

DataFormatDATA_FORMAT_R16G16_UINT =80

16-bit-per-channel unsigned integer red/green channel data format. Values are in the[0.0,65535] range.

DataFormatDATA_FORMAT_R16G16_SINT =81

16-bit-per-channel signed integer red/green channel data format. Values are in the[-32767,32767] range.

DataFormatDATA_FORMAT_R16G16_SFLOAT =82

16-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R16G16B16_UNORM =83

16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R16G16B16_SNORM =84

16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R16G16B16_USCALED =85

16-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,65535.0] range.

DataFormatDATA_FORMAT_R16G16B16_SSCALED =86

16-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the[-32767.0,32767.0] range.

DataFormatDATA_FORMAT_R16G16B16_UINT =87

16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the[0.0,65535] range.

DataFormatDATA_FORMAT_R16G16B16_SINT =88

16-bit-per-channel signed integer red/green/blue channel data format. Values are in the[-32767,32767] range.

DataFormatDATA_FORMAT_R16G16B16_SFLOAT =89

16-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R16G16B16A16_UNORM =90

16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R16G16B16A16_SNORM =91

16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the[-1.0,1.0] range.

DataFormatDATA_FORMAT_R16G16B16A16_USCALED =92

16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the[0.0,65535.0] range.

DataFormatDATA_FORMAT_R16G16B16A16_SSCALED =93

16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the[-32767.0,32767.0] range.

DataFormatDATA_FORMAT_R16G16B16A16_UINT =94

16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the[0.0,65535] range.

DataFormatDATA_FORMAT_R16G16B16A16_SINT =95

16-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the[-32767,32767] range.

DataFormatDATA_FORMAT_R16G16B16A16_SFLOAT =96

16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R32_UINT =97

32-bit-per-channel unsigned integer red channel data format. Values are in the[0,2^32-1] range.

DataFormatDATA_FORMAT_R32_SINT =98

32-bit-per-channel signed integer red channel data format. Values are in the[2^31+1,2^31-1] range.

DataFormatDATA_FORMAT_R32_SFLOAT =99

32-bit-per-channel signed floating-point red channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R32G32_UINT =100

32-bit-per-channel unsigned integer red/green channel data format. Values are in the[0,2^32-1] range.

DataFormatDATA_FORMAT_R32G32_SINT =101

32-bit-per-channel signed integer red/green channel data format. Values are in the[2^31+1,2^31-1] range.

DataFormatDATA_FORMAT_R32G32_SFLOAT =102

32-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R32G32B32_UINT =103

32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the[0,2^32-1] range.

DataFormatDATA_FORMAT_R32G32B32_SINT =104

32-bit-per-channel signed integer red/green/blue channel data format. Values are in the[2^31+1,2^31-1] range.

DataFormatDATA_FORMAT_R32G32B32_SFLOAT =105

32-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R32G32B32A32_UINT =106

32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the[0,2^32-1] range.

DataFormatDATA_FORMAT_R32G32B32A32_SINT =107

32-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the[2^31+1,2^31-1] range.

DataFormatDATA_FORMAT_R32G32B32A32_SFLOAT =108

32-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R64_UINT =109

64-bit-per-channel unsigned integer red channel data format. Values are in the[0,2^64-1] range.

DataFormatDATA_FORMAT_R64_SINT =110

64-bit-per-channel signed integer red channel data format. Values are in the[2^63+1,2^63-1] range.

DataFormatDATA_FORMAT_R64_SFLOAT =111

64-bit-per-channel signed floating-point red channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R64G64_UINT =112

64-bit-per-channel unsigned integer red/green channel data format. Values are in the[0,2^64-1] range.

DataFormatDATA_FORMAT_R64G64_SINT =113

64-bit-per-channel signed integer red/green channel data format. Values are in the[2^63+1,2^63-1] range.

DataFormatDATA_FORMAT_R64G64_SFLOAT =114

64-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R64G64B64_UINT =115

64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the[0,2^64-1] range.

DataFormatDATA_FORMAT_R64G64B64_SINT =116

64-bit-per-channel signed integer red/green/blue channel data format. Values are in the[2^63+1,2^63-1] range.

DataFormatDATA_FORMAT_R64G64B64_SFLOAT =117

64-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.

DataFormatDATA_FORMAT_R64G64B64A64_UINT =118

64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the[0,2^64-1] range.

DataFormatDATA_FORMAT_R64G64B64A64_SINT =119

64-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the[2^63+1,2^63-1] range.

DataFormatDATA_FORMAT_R64G64B64A64_SFLOAT =120

64-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.

DataFormatDATA_FORMAT_B10G11R11_UFLOAT_PACK32 =121

Unsigned floating-point blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 10 bits of blue channel, 11 bits of green channel and 11 bits of red channel.

DataFormatDATA_FORMAT_E5B9G9R9_UFLOAT_PACK32 =122

Unsigned floating-point exposure/blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 5 bits of exposure, 9 bits of blue channel, 9 bits of green channel and 9 bits of red channel.

DataFormatDATA_FORMAT_D16_UNORM =123

16-bit unsigned floating-point depth data format with normalized value. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_X8_D24_UNORM_PACK32 =124

24-bit unsigned floating-point depth data format with normalized value, plus 8 unused bits, packed in 32 bits. Values for depth are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_D32_SFLOAT =125

32-bit signed floating-point depth data format with the value stored as-is.

DataFormatDATA_FORMAT_S8_UINT =126

8-bit unsigned integer stencil data format.

DataFormatDATA_FORMAT_D16_UNORM_S8_UINT =127

16-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the[0.0,1.0] range. Values for stencil are in the[0,255] range.

DataFormatDATA_FORMAT_D24_UNORM_S8_UINT =128

24-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the[0.0,1.0] range. Values for stencil are in the[0,255] range.

DataFormatDATA_FORMAT_D32_SFLOAT_S8_UINT =129

32-bit signed floating-point depth data format with the value stored as-is, plus 8 bits of stencil in unsigned integer format. Values for stencil are in the[0,255] range.

DataFormatDATA_FORMAT_BC1_RGB_UNORM_BLOCK =130

VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1).

DataFormatDATA_FORMAT_BC1_RGB_SRGB_BLOCK =131

VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1).

DataFormatDATA_FORMAT_BC1_RGBA_UNORM_BLOCK =132

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1).

DataFormatDATA_FORMAT_BC1_RGBA_SRGB_BLOCK =133

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1).

DataFormatDATA_FORMAT_BC2_UNORM_BLOCK =134

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3).

DataFormatDATA_FORMAT_BC2_SRGB_BLOCK =135

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3).

DataFormatDATA_FORMAT_BC3_UNORM_BLOCK =136

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5).

DataFormatDATA_FORMAT_BC3_SRGB_BLOCK =137

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5).

DataFormatDATA_FORMAT_BC4_UNORM_BLOCK =138

VRAM-compressed unsigned red channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is 8 bits of red channel. Using BC4 texture compression.

DataFormatDATA_FORMAT_BC4_SNORM_BLOCK =139

VRAM-compressed signed red channel data format with normalized value. Values are in the[-1.0,1.0] range. The format's precision is 8 bits of red channel. Using BC4 texture compression.

DataFormatDATA_FORMAT_BC5_UNORM_BLOCK =140

VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC).

DataFormatDATA_FORMAT_BC5_SNORM_BLOCK =141

VRAM-compressed signed red/green channel data format with normalized value. Values are in the[-1.0,1.0] range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC).

DataFormatDATA_FORMAT_BC6H_UFLOAT_BLOCK =142

VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR).

DataFormatDATA_FORMAT_BC6H_SFLOAT_BLOCK =143

VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR).

DataFormatDATA_FORMAT_BC7_UNORM_BLOCK =144

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR.

DataFormatDATA_FORMAT_BC7_SRGB_BLOCK =145

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR.

DataFormatDATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK =146

VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the[0.0,1.0] range. Using ETC2 texture compression.

DataFormatDATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK =147

VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. Using ETC2 texture compression.

DataFormatDATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK =148

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression.

DataFormatDATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK =149

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression.

DataFormatDATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK =150

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the[0.0,1.0] range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression.

DataFormatDATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK =151

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the[0.0,1.0] range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression.

DataFormatDATA_FORMAT_EAC_R11_UNORM_BLOCK =152

11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the[0.0,1.0] range. Using ETC2 texture compression.

DataFormatDATA_FORMAT_EAC_R11_SNORM_BLOCK =153

11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the[-1.0,1.0] range. Using ETC2 texture compression.

DataFormatDATA_FORMAT_EAC_R11G11_UNORM_BLOCK =154

11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the[0.0,1.0] range. Using ETC2 texture compression.

DataFormatDATA_FORMAT_EAC_R11G11_SNORM_BLOCK =155

11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the[-1.0,1.0] range. Using ETC2 texture compression.

DataFormatDATA_FORMAT_ASTC_4x4_UNORM_BLOCK =156

VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_4x4_SRGB_BLOCK =157

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 4×4 blocks (highest quality). Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_5x4_UNORM_BLOCK =158

VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_5x4_SRGB_BLOCK =159

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×4 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_5x5_UNORM_BLOCK =160

VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_5x5_SRGB_BLOCK =161

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_6x5_UNORM_BLOCK =162

VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_6x5_SRGB_BLOCK =163

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_6x6_UNORM_BLOCK =164

VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_6x6_SRGB_BLOCK =165

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×6 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_8x5_UNORM_BLOCK =166

VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_8x5_SRGB_BLOCK =167

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_8x6_UNORM_BLOCK =168

VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_8x6_SRGB_BLOCK =169

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×6 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_8x8_UNORM_BLOCK =170

VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_8x8_SRGB_BLOCK =171

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×8 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x5_UNORM_BLOCK =172

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x5_SRGB_BLOCK =173

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×5 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x6_UNORM_BLOCK =174

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x6_SRGB_BLOCK =175

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×6 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x8_UNORM_BLOCK =176

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x8_SRGB_BLOCK =177

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×8 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x10_UNORM_BLOCK =178

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_10x10_SRGB_BLOCK =179

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×10 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_12x10_UNORM_BLOCK =180

VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_12x10_SRGB_BLOCK =181

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12×10 blocks. Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_12x12_UNORM_BLOCK =182

VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_ASTC_12x12_SRGB_BLOCK =183

VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12 blocks (lowest quality). Values are in the[0.0,1.0] range. Using ASTC compression.

DataFormatDATA_FORMAT_G8B8G8R8_422_UNORM =184

8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_B8G8R8G8_422_UNORM =185

8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM =186

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G8_B8R8_2PLANE_420_UNORM =187

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM =188

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G8_B8R8_2PLANE_422_UNORM =189

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM =190

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R10X6_UNORM_PACK16 =191

10-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R10X6G10X6_UNORM_2PACK16 =192

10-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 =193

10-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 =194

10-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

DataFormatDATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 =195

10-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

DataFormatDATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 =196

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 =197

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 =198

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 =199

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 =200

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R12X4_UNORM_PACK16 =201

12-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R12X4G12X4_UNORM_2PACK16 =202

12-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 =203

12-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 =204

12-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

DataFormatDATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 =205

12-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

DataFormatDATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 =206

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 =207

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 =208

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 =209

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 =210

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_G16B16G16R16_422_UNORM =211

16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_B16G16R16G16_422_UNORM =212

16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM =213

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G16_B16R16_2PLANE_420_UNORM =214

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM =215

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G16_B16R16_2PLANE_422_UNORM =216

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue/red). Values are in the[0.0,1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

DataFormatDATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM =217

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the[0.0,1.0] range.

DataFormatDATA_FORMAT_MAX =218

Represents the size of theDataFormat enum.


flagsBarrierMask:🔗

BarrierMaskBARRIER_MASK_VERTEX =1

Vertex shader barrier mask.

BarrierMaskBARRIER_MASK_FRAGMENT =8

Fragment shader barrier mask.

BarrierMaskBARRIER_MASK_COMPUTE =2

Compute barrier mask.

BarrierMaskBARRIER_MASK_TRANSFER =4

Transfer barrier mask.

BarrierMaskBARRIER_MASK_RASTER =9

Raster barrier mask (vertex and fragment). Equivalent toBARRIER_MASK_VERTEX|BARRIER_MASK_FRAGMENT.

BarrierMaskBARRIER_MASK_ALL_BARRIERS =32767

Barrier mask for all types (vertex, fragment, compute, transfer).

BarrierMaskBARRIER_MASK_NO_BARRIER =32768

No barrier for any type.


enumTextureType:🔗

TextureTypeTEXTURE_TYPE_1D =0

1-dimensional texture.

TextureTypeTEXTURE_TYPE_2D =1

2-dimensional texture.

TextureTypeTEXTURE_TYPE_3D =2

3-dimensional texture.

TextureTypeTEXTURE_TYPE_CUBE =3

Cubemap texture.

TextureTypeTEXTURE_TYPE_1D_ARRAY =4

Array of 1-dimensional textures.

TextureTypeTEXTURE_TYPE_2D_ARRAY =5

Array of 2-dimensional textures.

TextureTypeTEXTURE_TYPE_CUBE_ARRAY =6

Array ofCubemap textures.

TextureTypeTEXTURE_TYPE_MAX =7

Represents the size of theTextureType enum.


enumTextureSamples:🔗

TextureSamplesTEXTURE_SAMPLES_1 =0

Perform 1 texture sample (this is the fastest but lowest-quality for antialiasing).

TextureSamplesTEXTURE_SAMPLES_2 =1

Perform 2 texture samples.

TextureSamplesTEXTURE_SAMPLES_4 =2

Perform 4 texture samples.

TextureSamplesTEXTURE_SAMPLES_8 =3

Perform 8 texture samples. Not supported on mobile GPUs (including Apple Silicon).

TextureSamplesTEXTURE_SAMPLES_16 =4

Perform 16 texture samples. Not supported on mobile GPUs and many desktop GPUs.

TextureSamplesTEXTURE_SAMPLES_32 =5

Perform 32 texture samples. Not supported on most GPUs.

TextureSamplesTEXTURE_SAMPLES_64 =6

Perform 64 texture samples (this is the slowest but highest-quality for antialiasing). Not supported on most GPUs.

TextureSamplesTEXTURE_SAMPLES_MAX =7

Represents the size of theTextureSamples enum.


flagsTextureUsageBits:🔗

TextureUsageBitsTEXTURE_USAGE_SAMPLING_BIT =1

Texture can be sampled.

TextureUsageBitsTEXTURE_USAGE_COLOR_ATTACHMENT_BIT =2

Texture can be used as a color attachment in a framebuffer.

TextureUsageBitsTEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT =4

Texture can be used as a depth/stencil attachment in a framebuffer.

TextureUsageBitsTEXTURE_USAGE_STORAGE_BIT =8

Texture can be used as astorage image.

TextureUsageBitsTEXTURE_USAGE_STORAGE_ATOMIC_BIT =16

Texture can be used as astorage image with support for atomic operations.

TextureUsageBitsTEXTURE_USAGE_CPU_READ_BIT =32

Texture can be read back on the CPU usingtexture_get_data() faster than without this bit, since it is always kept in the system memory.

TextureUsageBitsTEXTURE_USAGE_CAN_UPDATE_BIT =64

Texture can be updated usingtexture_update().

TextureUsageBitsTEXTURE_USAGE_CAN_COPY_FROM_BIT =128

Texture can be a source fortexture_copy().

TextureUsageBitsTEXTURE_USAGE_CAN_COPY_TO_BIT =256

Texture can be a destination fortexture_copy().

TextureUsageBitsTEXTURE_USAGE_INPUT_ATTACHMENT_BIT =512

Texture can be used as ainput attachment in a framebuffer.


enumTextureSwizzle:🔗

TextureSwizzleTEXTURE_SWIZZLE_IDENTITY =0

Return the sampled value as-is.

TextureSwizzleTEXTURE_SWIZZLE_ZERO =1

Always return0.0 when sampling.

TextureSwizzleTEXTURE_SWIZZLE_ONE =2

Always return1.0 when sampling.

TextureSwizzleTEXTURE_SWIZZLE_R =3

Sample the red color channel.

TextureSwizzleTEXTURE_SWIZZLE_G =4

Sample the green color channel.

TextureSwizzleTEXTURE_SWIZZLE_B =5

Sample the blue color channel.

TextureSwizzleTEXTURE_SWIZZLE_A =6

Sample the alpha channel.

TextureSwizzleTEXTURE_SWIZZLE_MAX =7

Represents the size of theTextureSwizzle enum.


enumTextureSliceType:🔗

TextureSliceTypeTEXTURE_SLICE_2D =0

2-dimensional texture slice.

TextureSliceTypeTEXTURE_SLICE_CUBEMAP =1

Cubemap texture slice.

TextureSliceTypeTEXTURE_SLICE_3D =2

3-dimensional texture slice.


enumSamplerFilter:🔗

SamplerFilterSAMPLER_FILTER_NEAREST =0

Nearest-neighbor sampler filtering. Sampling at higher resolutions than the source will result in a pixelated look.

SamplerFilterSAMPLER_FILTER_LINEAR =1

Bilinear sampler filtering. Sampling at higher resolutions than the source will result in a blurry look.


enumSamplerRepeatMode:🔗

SamplerRepeatModeSAMPLER_REPEAT_MODE_REPEAT =0

Sample with repeating enabled.

SamplerRepeatModeSAMPLER_REPEAT_MODE_MIRRORED_REPEAT =1

Sample with mirrored repeating enabled. When sampling outside the[0.0,1.0] range, return a mirrored version of the sampler. This mirrored version is mirrored again if sampling further away, with the pattern repeating indefinitely.

SamplerRepeatModeSAMPLER_REPEAT_MODE_CLAMP_TO_EDGE =2

Sample with repeating disabled. When sampling outside the[0.0,1.0] range, return the color of the last pixel on the edge.

SamplerRepeatModeSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER =3

Sample with repeating disabled. When sampling outside the[0.0,1.0] range, return the specifiedRDSamplerState.border_color.

SamplerRepeatModeSAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE =4

Sample with mirrored repeating enabled, but only once. When sampling in the[-1.0,0.0] range, return a mirrored version of the sampler. When sampling outside the[-1.0,1.0] range, return the color of the last pixel on the edge.

SamplerRepeatModeSAMPLER_REPEAT_MODE_MAX =5

Represents the size of theSamplerRepeatMode enum.


enumSamplerBorderColor:🔗

SamplerBorderColorSAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK =0

Return a floating-point transparent black color when sampling outside the[0.0,1.0] range. Only effective if the sampler repeat mode isSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER.

SamplerBorderColorSAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK =1

Return a integer transparent black color when sampling outside the[0.0,1.0] range. Only effective if the sampler repeat mode isSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER.

SamplerBorderColorSAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK =2

Return a floating-point opaque black color when sampling outside the[0.0,1.0] range. Only effective if the sampler repeat mode isSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER.

SamplerBorderColorSAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK =3

Return a integer opaque black color when sampling outside the[0.0,1.0] range. Only effective if the sampler repeat mode isSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER.

SamplerBorderColorSAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE =4

Return a floating-point opaque white color when sampling outside the[0.0,1.0] range. Only effective if the sampler repeat mode isSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER.

SamplerBorderColorSAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE =5

Return a integer opaque white color when sampling outside the[0.0,1.0] range. Only effective if the sampler repeat mode isSAMPLER_REPEAT_MODE_CLAMP_TO_BORDER.

SamplerBorderColorSAMPLER_BORDER_COLOR_MAX =6

Represents the size of theSamplerBorderColor enum.


enumVertexFrequency:🔗

VertexFrequencyVERTEX_FREQUENCY_VERTEX =0

Vertex attribute addressing is a function of the vertex. This is used to specify the rate at which vertex attributes are pulled from buffers.

VertexFrequencyVERTEX_FREQUENCY_INSTANCE =1

Vertex attribute addressing is a function of the instance index. This is used to specify the rate at which vertex attributes are pulled from buffers.


enumIndexBufferFormat:🔗

IndexBufferFormatINDEX_BUFFER_FORMAT_UINT16 =0

Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to65535.

IndexBufferFormatINDEX_BUFFER_FORMAT_UINT32 =1

Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to4294967295.


flagsStorageBufferUsage:🔗

StorageBufferUsageSTORAGE_BUFFER_USAGE_DISPATCH_INDIRECT =1

There is currently no description for this enum. Please help us bycontributing one!


flagsBufferCreationBits:🔗

BufferCreationBitsBUFFER_CREATION_DEVICE_ADDRESS_BIT =1

Optionally, set this flag if you wish to usebuffer_get_device_address() functionality. You must first check the GPU supports it:

rd=RenderingServer.get_rendering_device()ifrd.has_feature(RenderingDevice.SUPPORTS_BUFFER_DEVICE_ADDRESS):storage_buffer=rd.storage_buffer_create(bytes.size(),bytes,RenderingDevice.STORAGE_BUFFER_USAGE_SHADER_DEVICE_ADDRESS):storage_buffer_address=rd.buffer_get_device_address(storage_buffer)

BufferCreationBitsBUFFER_CREATION_AS_STORAGE_BIT =2

Set this flag so that it is created as storage. This is useful if Compute Shaders need access (for reading or writing) to the buffer, e.g. skeletal animations are processed in Compute Shaders which need access to vertex buffers, to be later consumed by vertex shaders as part of the regular rasterization pipeline.


enumUniformType:🔗

UniformTypeUNIFORM_TYPE_SAMPLER =0

Sampler uniform.

UniformTypeUNIFORM_TYPE_SAMPLER_WITH_TEXTURE =1

Sampler uniform with a texture.

UniformTypeUNIFORM_TYPE_TEXTURE =2

Texture uniform.

UniformTypeUNIFORM_TYPE_IMAGE =3

Image uniform.

UniformTypeUNIFORM_TYPE_TEXTURE_BUFFER =4

Texture buffer uniform.

UniformTypeUNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER =5

Sampler uniform with a texture buffer.

UniformTypeUNIFORM_TYPE_IMAGE_BUFFER =6

Image buffer uniform.

UniformTypeUNIFORM_TYPE_UNIFORM_BUFFER =7

Uniform buffer uniform.

UniformTypeUNIFORM_TYPE_STORAGE_BUFFER =8

Storage buffer uniform.

UniformTypeUNIFORM_TYPE_INPUT_ATTACHMENT =9

Input attachment uniform.

UniformTypeUNIFORM_TYPE_MAX =10

Represents the size of theUniformType enum.


enumRenderPrimitive:🔗

RenderPrimitiveRENDER_PRIMITIVE_POINTS =0

Point rendering primitive (with constant size, regardless of distance from camera).

RenderPrimitiveRENDER_PRIMITIVE_LINES =1

Line list rendering primitive. Lines are drawn separated from each other.

RenderPrimitiveRENDER_PRIMITIVE_LINES_WITH_ADJACENCY =2

Line list rendering primitive with adjacency.

Note: Adjacency is only useful with geometry shaders, which Godot does not expose.

RenderPrimitiveRENDER_PRIMITIVE_LINESTRIPS =3

Line strip rendering primitive. Lines drawn are connected to the previous vertex.

RenderPrimitiveRENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY =4

Line strip rendering primitive with adjacency.

Note: Adjacency is only useful with geometry shaders, which Godot does not expose.

RenderPrimitiveRENDER_PRIMITIVE_TRIANGLES =5

Triangle list rendering primitive. Triangles are drawn separated from each other.

RenderPrimitiveRENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY =6

Triangle list rendering primitive with adjacency.

Note: Adjacency is only useful with geometry shaders, which Godot does not expose.

RenderPrimitiveRENDER_PRIMITIVE_TRIANGLE_STRIPS =7

Triangle strip rendering primitive. Triangles drawn are connected to the previous triangle.

RenderPrimitiveRENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY =8

Triangle strip rendering primitive with adjacency.

Note: Adjacency is only useful with geometry shaders, which Godot does not expose.

RenderPrimitiveRENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX =9

Triangle strip rendering primitive withprimitive restart enabled. Triangles drawn are connected to the previous triangle, but a primitive restart index can be specified before drawing to create a second triangle strip after the specified index.

Note: Only compatible with indexed draws.

RenderPrimitiveRENDER_PRIMITIVE_TESSELATION_PATCH =10

Tessellation patch rendering primitive. Only useful with tessellation shaders, which can be used to deform these patches.

RenderPrimitiveRENDER_PRIMITIVE_MAX =11

Represents the size of theRenderPrimitive enum.


enumPolygonCullMode:🔗

PolygonCullModePOLYGON_CULL_DISABLED =0

Do not use polygon front face or backface culling.

PolygonCullModePOLYGON_CULL_FRONT =1

Use polygon frontface culling (faces pointing towards the camera are hidden).

PolygonCullModePOLYGON_CULL_BACK =2

Use polygon backface culling (faces pointing away from the camera are hidden).


enumPolygonFrontFace:🔗

PolygonFrontFacePOLYGON_FRONT_FACE_CLOCKWISE =0

Clockwise winding order to determine which face of a polygon is its front face.

PolygonFrontFacePOLYGON_FRONT_FACE_COUNTER_CLOCKWISE =1

Counter-clockwise winding order to determine which face of a polygon is its front face.


enumStencilOperation:🔗

StencilOperationSTENCIL_OP_KEEP =0

Keep the current stencil value.

StencilOperationSTENCIL_OP_ZERO =1

Set the stencil value to0.

StencilOperationSTENCIL_OP_REPLACE =2

Replace the existing stencil value with the new one.

StencilOperationSTENCIL_OP_INCREMENT_AND_CLAMP =3

Increment the existing stencil value and clamp to the maximum representable unsigned value if reached. Stencil bits are considered as an unsigned integer.

StencilOperationSTENCIL_OP_DECREMENT_AND_CLAMP =4

Decrement the existing stencil value and clamp to the minimum value if reached. Stencil bits are considered as an unsigned integer.

StencilOperationSTENCIL_OP_INVERT =5

Bitwise-invert the existing stencil value.

StencilOperationSTENCIL_OP_INCREMENT_AND_WRAP =6

Increment the stencil value and wrap around to0 if reaching the maximum representable unsigned. Stencil bits are considered as an unsigned integer.

StencilOperationSTENCIL_OP_DECREMENT_AND_WRAP =7

Decrement the stencil value and wrap around to the maximum representable unsigned if reaching the minimum. Stencil bits are considered as an unsigned integer.

StencilOperationSTENCIL_OP_MAX =8

Represents the size of theStencilOperation enum.


enumCompareOperator:🔗

CompareOperatorCOMPARE_OP_NEVER =0

"Never" comparison (opposite ofCOMPARE_OP_ALWAYS).

CompareOperatorCOMPARE_OP_LESS =1

"Less than" comparison.

CompareOperatorCOMPARE_OP_EQUAL =2

"Equal" comparison.

CompareOperatorCOMPARE_OP_LESS_OR_EQUAL =3

"Less than or equal" comparison.

CompareOperatorCOMPARE_OP_GREATER =4

"Greater than" comparison.

CompareOperatorCOMPARE_OP_NOT_EQUAL =5

"Not equal" comparison.

CompareOperatorCOMPARE_OP_GREATER_OR_EQUAL =6

"Greater than or equal" comparison.

CompareOperatorCOMPARE_OP_ALWAYS =7

"Always" comparison (opposite ofCOMPARE_OP_NEVER).

CompareOperatorCOMPARE_OP_MAX =8

Represents the size of theCompareOperator enum.


enumLogicOperation:🔗

LogicOperationLOGIC_OP_CLEAR =0

Clear logic operation (result is always0). See alsoLOGIC_OP_SET.

LogicOperationLOGIC_OP_AND =1

AND logic operation.

LogicOperationLOGIC_OP_AND_REVERSE =2

AND logic operation with thedestination operand being inverted. See alsoLOGIC_OP_AND_INVERTED.

LogicOperationLOGIC_OP_COPY =3

Copy logic operation (keeps thesource value as-is). See alsoLOGIC_OP_COPY_INVERTED andLOGIC_OP_NO_OP.

LogicOperationLOGIC_OP_AND_INVERTED =4

AND logic operation with thesource operand being inverted. See alsoLOGIC_OP_AND_REVERSE.

LogicOperationLOGIC_OP_NO_OP =5

No-op logic operation (keeps thedestination value as-is). See alsoLOGIC_OP_COPY.

LogicOperationLOGIC_OP_XOR =6

Exclusive or (XOR) logic operation.

LogicOperationLOGIC_OP_OR =7

OR logic operation.

LogicOperationLOGIC_OP_NOR =8

Not-OR (NOR) logic operation.

LogicOperationLOGIC_OP_EQUIVALENT =9

Not-XOR (XNOR) logic operation.

LogicOperationLOGIC_OP_INVERT =10

Invert logic operation.

LogicOperationLOGIC_OP_OR_REVERSE =11

OR logic operation with thedestination operand being inverted. See alsoLOGIC_OP_OR_REVERSE.

LogicOperationLOGIC_OP_COPY_INVERTED =12

NOT logic operation (inverts the value). See alsoLOGIC_OP_COPY.

LogicOperationLOGIC_OP_OR_INVERTED =13

OR logic operation with thesource operand being inverted. See alsoLOGIC_OP_OR_REVERSE.

LogicOperationLOGIC_OP_NAND =14

Not-AND (NAND) logic operation.

LogicOperationLOGIC_OP_SET =15

SET logic operation (result is always1). See alsoLOGIC_OP_CLEAR.

LogicOperationLOGIC_OP_MAX =16

Represents the size of theLogicOperation enum.


enumBlendFactor:🔗

BlendFactorBLEND_FACTOR_ZERO =0

Constant0.0 blend factor.

BlendFactorBLEND_FACTOR_ONE =1

Constant1.0 blend factor.

BlendFactorBLEND_FACTOR_SRC_COLOR =2

Color blend factor issourcecolor. Alpha blend factor issourcealpha.

BlendFactorBLEND_FACTOR_ONE_MINUS_SRC_COLOR =3

Color blend factor is1.0-sourcecolor. Alpha blend factor is1.0-sourcealpha.

BlendFactorBLEND_FACTOR_DST_COLOR =4

Color blend factor isdestinationcolor. Alpha blend factor isdestinationalpha.

BlendFactorBLEND_FACTOR_ONE_MINUS_DST_COLOR =5

Color blend factor is1.0-destinationcolor. Alpha blend factor is1.0-destinationalpha.

BlendFactorBLEND_FACTOR_SRC_ALPHA =6

Color and alpha blend factor issourcealpha.

BlendFactorBLEND_FACTOR_ONE_MINUS_SRC_ALPHA =7

Color and alpha blend factor is1.0-sourcealpha.

BlendFactorBLEND_FACTOR_DST_ALPHA =8

Color and alpha blend factor isdestinationalpha.

BlendFactorBLEND_FACTOR_ONE_MINUS_DST_ALPHA =9

Color and alpha blend factor is1.0-destinationalpha.

BlendFactorBLEND_FACTOR_CONSTANT_COLOR =10

Color blend factor isblendconstantcolor. Alpha blend factor isblendconstantalpha (seedraw_list_set_blend_constants()).

BlendFactorBLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR =11

Color blend factor is1.0-blendconstantcolor. Alpha blend factor is1.0-blendconstantalpha (seedraw_list_set_blend_constants()).

BlendFactorBLEND_FACTOR_CONSTANT_ALPHA =12

Color and alpha blend factor isblendconstantalpha (seedraw_list_set_blend_constants()).

BlendFactorBLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA =13

Color and alpha blend factor is1.0-blendconstantalpha (seedraw_list_set_blend_constants()).

BlendFactorBLEND_FACTOR_SRC_ALPHA_SATURATE =14

Color blend factor ismin(sourcealpha,1.0-destinationalpha). Alpha blend factor is1.0.

BlendFactorBLEND_FACTOR_SRC1_COLOR =15

Color blend factor issecondsourcecolor. Alpha blend factor issecondsourcealpha. Only relevant for dual-source blending.

BlendFactorBLEND_FACTOR_ONE_MINUS_SRC1_COLOR =16

Color blend factor is1.0-secondsourcecolor. Alpha blend factor is1.0-secondsourcealpha. Only relevant for dual-source blending.

BlendFactorBLEND_FACTOR_SRC1_ALPHA =17

Color and alpha blend factor issecondsourcealpha. Only relevant for dual-source blending.

BlendFactorBLEND_FACTOR_ONE_MINUS_SRC1_ALPHA =18

Color and alpha blend factor is1.0-secondsourcealpha. Only relevant for dual-source blending.

BlendFactorBLEND_FACTOR_MAX =19

Represents the size of theBlendFactor enum.


enumBlendOperation:🔗

BlendOperationBLEND_OP_ADD =0

Additive blending operation (source+destination).

BlendOperationBLEND_OP_SUBTRACT =1

Subtractive blending operation (source-destination).

BlendOperationBLEND_OP_REVERSE_SUBTRACT =2

Reverse subtractive blending operation (destination-source).

BlendOperationBLEND_OP_MINIMUM =3

Minimum blending operation (keep the lowest value of the two).

BlendOperationBLEND_OP_MAXIMUM =4

Maximum blending operation (keep the highest value of the two).

BlendOperationBLEND_OP_MAX =5

Represents the size of theBlendOperation enum.


flagsPipelineDynamicStateFlags:🔗

PipelineDynamicStateFlagsDYNAMIC_STATE_LINE_WIDTH =1

Allows dynamically changing the width of rendering lines.

PipelineDynamicStateFlagsDYNAMIC_STATE_DEPTH_BIAS =2

Allows dynamically changing the depth bias.

PipelineDynamicStateFlagsDYNAMIC_STATE_BLEND_CONSTANTS =4

There is currently no description for this enum. Please help us bycontributing one!

PipelineDynamicStateFlagsDYNAMIC_STATE_DEPTH_BOUNDS =8

There is currently no description for this enum. Please help us bycontributing one!

PipelineDynamicStateFlagsDYNAMIC_STATE_STENCIL_COMPARE_MASK =16

There is currently no description for this enum. Please help us bycontributing one!

PipelineDynamicStateFlagsDYNAMIC_STATE_STENCIL_WRITE_MASK =32

There is currently no description for this enum. Please help us bycontributing one!

PipelineDynamicStateFlagsDYNAMIC_STATE_STENCIL_REFERENCE =64

There is currently no description for this enum. Please help us bycontributing one!


enumInitialAction:🔗

InitialActionINITIAL_ACTION_LOAD =0

Deprecated: Initial actions are solved automatically by RenderingDevice.

Load the previous contents of the framebuffer.

InitialActionINITIAL_ACTION_CLEAR =1

Deprecated: Initial actions are solved automatically by RenderingDevice.

Clear the whole framebuffer or its specified region.

InitialActionINITIAL_ACTION_DISCARD =2

Deprecated: Initial actions are solved automatically by RenderingDevice.

Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them.

InitialActionINITIAL_ACTION_MAX =3

Deprecated: Initial actions are solved automatically by RenderingDevice.

Represents the size of theInitialAction enum.

InitialActionINITIAL_ACTION_CLEAR_REGION =1

Deprecated: Initial actions are solved automatically by RenderingDevice.

InitialActionINITIAL_ACTION_CLEAR_REGION_CONTINUE =1

Deprecated: Initial actions are solved automatically by RenderingDevice.

InitialActionINITIAL_ACTION_KEEP =0

Deprecated: Initial actions are solved automatically by RenderingDevice.

InitialActionINITIAL_ACTION_DROP =2

Deprecated: Initial actions are solved automatically by RenderingDevice.

InitialActionINITIAL_ACTION_CONTINUE =0

Deprecated: Initial actions are solved automatically by RenderingDevice.


enumFinalAction:🔗

FinalActionFINAL_ACTION_STORE =0

Deprecated: Final actions are solved automatically by RenderingDevice.

Store the result of the draw list in the framebuffer. This is generally what you want to do.

FinalActionFINAL_ACTION_DISCARD =1

Deprecated: Final actions are solved automatically by RenderingDevice.

Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list.

FinalActionFINAL_ACTION_MAX =2

Deprecated: Final actions are solved automatically by RenderingDevice.

Represents the size of theFinalAction enum.

FinalActionFINAL_ACTION_READ =0

Deprecated: Final actions are solved automatically by RenderingDevice.

FinalActionFINAL_ACTION_CONTINUE =0

Deprecated: Final actions are solved automatically by RenderingDevice.


enumShaderStage:🔗

ShaderStageSHADER_STAGE_VERTEX =0

Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices).

ShaderStageSHADER_STAGE_FRAGMENT =1

Fragment shader stage (called "pixel shader" in Direct3D). This can be used to manipulate pixels from a shader.

ShaderStageSHADER_STAGE_TESSELATION_CONTROL =2

Tessellation control shader stage. This can be used to create additional geometry from a shader.

ShaderStageSHADER_STAGE_TESSELATION_EVALUATION =3

Tessellation evaluation shader stage. This can be used to create additional geometry from a shader.

ShaderStageSHADER_STAGE_COMPUTE =4

Compute shader stage. This can be used to run arbitrary computing tasks in a shader, performing them on the GPU instead of the CPU.

ShaderStageSHADER_STAGE_MAX =5

Represents the size of theShaderStage enum.

ShaderStageSHADER_STAGE_VERTEX_BIT =1

Vertex shader stage bit (see alsoSHADER_STAGE_VERTEX).

ShaderStageSHADER_STAGE_FRAGMENT_BIT =2

Fragment shader stage bit (see alsoSHADER_STAGE_FRAGMENT).

ShaderStageSHADER_STAGE_TESSELATION_CONTROL_BIT =4

Tessellation control shader stage bit (see alsoSHADER_STAGE_TESSELATION_CONTROL).

ShaderStageSHADER_STAGE_TESSELATION_EVALUATION_BIT =8

Tessellation evaluation shader stage bit (see alsoSHADER_STAGE_TESSELATION_EVALUATION).

ShaderStageSHADER_STAGE_COMPUTE_BIT =16

Compute shader stage bit (see alsoSHADER_STAGE_COMPUTE).


enumShaderLanguage:🔗

ShaderLanguageSHADER_LANGUAGE_GLSL =0

Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Godot shaders.

ShaderLanguageSHADER_LANGUAGE_HLSL =1

Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan).


enumPipelineSpecializationConstantType:🔗

PipelineSpecializationConstantTypePIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL =0

Boolean specialization constant.

PipelineSpecializationConstantTypePIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT =1

Integer specialization constant.

PipelineSpecializationConstantTypePIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT =2

Floating-point specialization constant.


enumFeatures:🔗

FeaturesSUPPORTS_BUFFER_DEVICE_ADDRESS =6

Features support for buffer device address extension.


enumLimit:🔗

LimitLIMIT_MAX_BOUND_UNIFORM_SETS =0

Maximum number of uniform sets that can be bound at a given time.

LimitLIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS =1

Maximum number of color framebuffer attachments that can be used at a given time.

LimitLIMIT_MAX_TEXTURES_PER_UNIFORM_SET =2

Maximum number of textures that can be used per uniform set.

LimitLIMIT_MAX_SAMPLERS_PER_UNIFORM_SET =3

Maximum number of samplers that can be used per uniform set.

LimitLIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET =4

Maximum number ofstorage buffers per uniform set.

LimitLIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET =5

Maximum number of storage images per uniform set.

LimitLIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET =6

Maximum number of uniform buffers per uniform set.

LimitLIMIT_MAX_DRAW_INDEXED_INDEX =7

Maximum index for an indexed draw command.

LimitLIMIT_MAX_FRAMEBUFFER_HEIGHT =8

Maximum height of a framebuffer (in pixels).

LimitLIMIT_MAX_FRAMEBUFFER_WIDTH =9

Maximum width of a framebuffer (in pixels).

LimitLIMIT_MAX_TEXTURE_ARRAY_LAYERS =10

Maximum number of texture array layers.

LimitLIMIT_MAX_TEXTURE_SIZE_1D =11

Maximum supported 1-dimensional texture size (in pixels on a single axis).

LimitLIMIT_MAX_TEXTURE_SIZE_2D =12

Maximum supported 2-dimensional texture size (in pixels on a single axis).

LimitLIMIT_MAX_TEXTURE_SIZE_3D =13

Maximum supported 3-dimensional texture size (in pixels on a single axis).

LimitLIMIT_MAX_TEXTURE_SIZE_CUBE =14

Maximum supported cubemap texture size (in pixels on a single axis of a single face).

LimitLIMIT_MAX_TEXTURES_PER_SHADER_STAGE =15

Maximum number of textures per shader stage.

LimitLIMIT_MAX_SAMPLERS_PER_SHADER_STAGE =16

Maximum number of samplers per shader stage.

LimitLIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE =17

Maximum number ofstorage buffers per shader stage.

LimitLIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE =18

Maximum number of storage images per shader stage.

LimitLIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE =19

Maximum number of uniform buffers per uniform set.

LimitLIMIT_MAX_PUSH_CONSTANT_SIZE =20

Maximum size of a push constant. A lot of devices are limited to 128 bytes, so try to avoid exceeding 128 bytes in push constants to ensure compatibility even if your GPU is reporting a higher value.

LimitLIMIT_MAX_UNIFORM_BUFFER_SIZE =21

Maximum size of a uniform buffer.

LimitLIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET =22

Maximum vertex input attribute offset.

LimitLIMIT_MAX_VERTEX_INPUT_ATTRIBUTES =23

Maximum number of vertex input attributes.

LimitLIMIT_MAX_VERTEX_INPUT_BINDINGS =24

Maximum number of vertex input bindings.

LimitLIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE =25

Maximum vertex input binding stride.

LimitLIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT =26

Minimum uniform buffer offset alignment.

LimitLIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE =27

Maximum shared memory size for compute shaders.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X =28

Maximum number of workgroups for compute shaders on the X axis.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y =29

Maximum number of workgroups for compute shaders on the Y axis.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z =30

Maximum number of workgroups for compute shaders on the Z axis.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS =31

Maximum number of workgroup invocations for compute shaders.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X =32

Maximum workgroup size for compute shaders on the X axis.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y =33

Maximum workgroup size for compute shaders on the Y axis.

LimitLIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z =34

Maximum workgroup size for compute shaders on the Z axis.

LimitLIMIT_MAX_VIEWPORT_DIMENSIONS_X =35

Maximum viewport width (in pixels).

LimitLIMIT_MAX_VIEWPORT_DIMENSIONS_Y =36

Maximum viewport height (in pixels).

LimitLIMIT_METALFX_TEMPORAL_SCALER_MIN_SCALE =46

Returns the smallest value forProjectSettings.rendering/scaling_3d/scale when using the MetalFX temporal upscaler.

Note: The returned value is multiplied by a factor of1000000 to preserve 6 digits of precision. It must be divided by1000000.0 to convert the value to a floating point number.

LimitLIMIT_METALFX_TEMPORAL_SCALER_MAX_SCALE =47

Returns the largest value forProjectSettings.rendering/scaling_3d/scale when using the MetalFX temporal upscaler.

Note: The returned value is multiplied by a factor of1000000 to preserve 6 digits of precision. It must be divided by1000000.0 to convert the value to a floating point number.


enumMemoryType:🔗

MemoryTypeMEMORY_TEXTURES =0

Memory taken by textures.

MemoryTypeMEMORY_BUFFERS =1

Memory taken by buffers.

MemoryTypeMEMORY_TOTAL =2

Total memory taken. This is greater than the sum ofMEMORY_TEXTURES andMEMORY_BUFFERS, as it also includes miscellaneous memory usage.


enumBreadcrumbMarker:🔗

BreadcrumbMarkerNONE =0

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerREFLECTION_PROBES =65536

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerSKY_PASS =131072

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerLIGHTMAPPER_PASS =196608

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerSHADOW_PASS_DIRECTIONAL =262144

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerSHADOW_PASS_CUBE =327680

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerOPAQUE_PASS =393216

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerALPHA_PASS =458752

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerTRANSPARENT_PASS =524288

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerPOST_PROCESSING_PASS =589824

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerBLIT_PASS =655360

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerUI_PASS =720896

There is currently no description for this enum. Please help us bycontributing one!

BreadcrumbMarkerDEBUG_PASS =786432

There is currently no description for this enum. Please help us bycontributing one!


flagsDrawFlags:🔗

DrawFlagsDRAW_DEFAULT_ALL =0

Do not clear or ignore any attachments.

DrawFlagsDRAW_CLEAR_COLOR_0 =1

Clear the first color attachment.

DrawFlagsDRAW_CLEAR_COLOR_1 =2

Clear the second color attachment.

DrawFlagsDRAW_CLEAR_COLOR_2 =4

Clear the third color attachment.

DrawFlagsDRAW_CLEAR_COLOR_3 =8

Clear the fourth color attachment.

DrawFlagsDRAW_CLEAR_COLOR_4 =16

Clear the fifth color attachment.

DrawFlagsDRAW_CLEAR_COLOR_5 =32

Clear the sixth color attachment.

DrawFlagsDRAW_CLEAR_COLOR_6 =64

Clear the seventh color attachment.

DrawFlagsDRAW_CLEAR_COLOR_7 =128

Clear the eighth color attachment.

DrawFlagsDRAW_CLEAR_COLOR_MASK =255

Mask for clearing all color attachments.

DrawFlagsDRAW_CLEAR_COLOR_ALL =255

Clear all color attachments.

DrawFlagsDRAW_IGNORE_COLOR_0 =256

Ignore the previous contents of the first color attachment.

DrawFlagsDRAW_IGNORE_COLOR_1 =512

Ignore the previous contents of the second color attachment.

DrawFlagsDRAW_IGNORE_COLOR_2 =1024

Ignore the previous contents of the third color attachment.

DrawFlagsDRAW_IGNORE_COLOR_3 =2048

Ignore the previous contents of the fourth color attachment.

DrawFlagsDRAW_IGNORE_COLOR_4 =4096

Ignore the previous contents of the fifth color attachment.

DrawFlagsDRAW_IGNORE_COLOR_5 =8192

Ignore the previous contents of the sixth color attachment.

DrawFlagsDRAW_IGNORE_COLOR_6 =16384

Ignore the previous contents of the seventh color attachment.

DrawFlagsDRAW_IGNORE_COLOR_7 =32768

Ignore the previous contents of the eighth color attachment.

DrawFlagsDRAW_IGNORE_COLOR_MASK =65280

Mask for ignoring all the previous contents of the color attachments.

DrawFlagsDRAW_IGNORE_COLOR_ALL =65280

Ignore the previous contents of all color attachments.

DrawFlagsDRAW_CLEAR_DEPTH =65536

Clear the depth attachment.

DrawFlagsDRAW_IGNORE_DEPTH =131072

Ignore the previous contents of the depth attachment.

DrawFlagsDRAW_CLEAR_STENCIL =262144

Clear the stencil attachment.

DrawFlagsDRAW_IGNORE_STENCIL =524288

Ignore the previous contents of the stencil attachment.

DrawFlagsDRAW_CLEAR_ALL =327935

Clear all attachments.

DrawFlagsDRAW_IGNORE_ALL =720640

Ignore the previous contents of all attachments.


Constants

INVALID_ID =-1🔗

Returned by functions that return an ID if a value is invalid.

INVALID_FORMAT_ID =-1🔗

Returned by functions that return a format ID if a value is invalid.


Method Descriptions

voidbarrier(from:BitField[BarrierMask] = 32767, to:BitField[BarrierMask] = 32767)🔗

Deprecated: Barriers are automatically inserted by RenderingDevice.

This method does nothing.


Errorbuffer_clear(buffer:RID, offset:int, size_bytes:int)🔗

Clears the contents of thebuffer, clearingsize_bytes bytes, starting atoffset.

Prints an error if:

  • the size isn't a multiple of four

  • the region specified byoffset +size_bytes exceeds the buffer

  • a draw list is currently active (created bydraw_list_begin())

  • a compute list is currently active (created bycompute_list_begin())


Errorbuffer_copy(src_buffer:RID, dst_buffer:RID, src_offset:int, dst_offset:int, size:int)🔗

Copiessize bytes from thesrc_buffer atsrc_offset intodst_buffer atdst_offset.

Prints an error if:

  • size exceeds the size of eithersrc_buffer ordst_buffer at their corresponding offsets

  • a draw list is currently active (created bydraw_list_begin())

  • a compute list is currently active (created bycompute_list_begin())


PackedByteArraybuffer_get_data(buffer:RID, offset_bytes:int = 0, size_bytes:int = 0)🔗

Returns a copy of the data of the specifiedbuffer, optionallyoffset_bytes andsize_bytes can be set to copy only a portion of the buffer.

Note: This method will block the GPU from working until the data is retrieved. Refer tobuffer_get_data_async() for an alternative that returns the data in more performant way.


Errorbuffer_get_data_async(buffer:RID, callback:Callable, offset_bytes:int = 0, size_bytes:int = 0)🔗

Asynchronous version ofbuffer_get_data(). RenderingDevice will callcallback in a certain amount of frames with the data the buffer had at the time of the request.

Note: At the moment, the delay corresponds to the amount of frames specified byProjectSettings.rendering/rendering_device/vsync/frame_queue_size.

Note: Downloading large buffers can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such asProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb to improve the transfer speed at the cost of extra memory.

func_buffer_get_data_callback(array):value=array.decode_u32(0)...rd.buffer_get_data_async(buffer,_buffer_get_data_callback)

intbuffer_get_device_address(buffer:RID)🔗

Returns the address of the givenbuffer which can be passed to shaders in any way to access underlying data. Buffer must have been created with this feature enabled.

Note: You must check that the GPU supports this functionality by callinghas_feature() withSUPPORTS_BUFFER_DEVICE_ADDRESS as a parameter.


Errorbuffer_update(buffer:RID, offset:int, size_bytes:int, data:PackedByteArray)🔗

Updates a region ofsize_bytes bytes, starting atoffset, in the buffer, with the specifieddata.

Prints an error if:

  • the region specified byoffset +size_bytes exceeds the buffer

  • a draw list is currently active (created bydraw_list_begin())

  • a compute list is currently active (created bycompute_list_begin())


voidcapture_timestamp(name:String)🔗

Creates a timestamp marker with the specifiedname. This is used for performance reporting with theget_captured_timestamp_cpu_time(),get_captured_timestamp_gpu_time() andget_captured_timestamp_name() methods.


voidcompute_list_add_barrier(compute_list:int)🔗

Raises a Vulkan compute barrier in the specifiedcompute_list.


intcompute_list_begin()🔗

Starts a list of compute commands created with thecompute_* methods. The returned value should be passed to othercompute_list_* functions.

Multiple compute lists cannot be created at the same time; you must finish the previous compute list first usingcompute_list_end().

A simple compute operation might look like this (code is not a complete example):

varrd=RenderingDevice.new()varcompute_list=rd.compute_list_begin()rd.compute_list_bind_compute_pipeline(compute_list,compute_shader_dilate_pipeline)rd.compute_list_bind_uniform_set(compute_list,compute_base_uniform_set,0)rd.compute_list_bind_uniform_set(compute_list,dilate_uniform_set,1)foriinatlas_slices:rd.compute_list_set_push_constant(compute_list,push_constant,push_constant.size())rd.compute_list_dispatch(compute_list,group_size.x,group_size.y,group_size.z)# No barrier, let them run all together.rd.compute_list_end()

voidcompute_list_bind_compute_pipeline(compute_list:int, compute_pipeline:RID)🔗

Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them insidecompute_list_dispatch().


voidcompute_list_bind_uniform_set(compute_list:int, uniform_set:RID, set_index:int)🔗

Binds theuniform_set to thiscompute_list. Godot ensures that all textures in the uniform set have the correct Vulkan access masks. If Godot had to change access masks of textures, it will raise a Vulkan image memory barrier.


voidcompute_list_dispatch(compute_list:int, x_groups:int, y_groups:int, z_groups:int)🔗

Submits the compute list for processing on the GPU. This is the compute equivalent todraw_list_draw().


voidcompute_list_dispatch_indirect(compute_list:int, buffer:RID, offset:int)🔗

Submits the compute list for processing on the GPU with the given group counts stored in thebuffer atoffset. Buffer must have been created withSTORAGE_BUFFER_USAGE_DISPATCH_INDIRECT flag.


voidcompute_list_end()🔗

Finishes a list of compute commands created with thecompute_* methods.


voidcompute_list_set_push_constant(compute_list:int, buffer:PackedByteArray, size_bytes:int)🔗

Sets the push constant data tobuffer for the specifiedcompute_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified insize_bytes (this can be obtained by calling thePackedByteArray.size() method on the passedbuffer).


RIDcompute_pipeline_create(shader:RID, specialization_constants:Array[RDPipelineSpecializationConstant] = [])🔗

Creates a new compute pipeline. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


boolcompute_pipeline_is_valid(compute_pipeline:RID)🔗

Returnstrue if the compute pipeline specified by thecompute_pipeline RID is valid,false otherwise.


RenderingDevicecreate_local_device()🔗

Create a new localRenderingDevice. This is most useful for performing compute operations on the GPU independently from the rest of the engine.


voiddraw_command_begin_label(name:String, color:Color)🔗

Create a command buffer debug label region that can be displayed in third-party tools such asRenderDoc. All regions must be ended with adraw_command_end_label() call. When viewed from the linear series of submissions to a single queue, calls todraw_command_begin_label() anddraw_command_end_label() must be matched and balanced.

TheVK_EXT_DEBUG_UTILS_EXTENSION_NAME Vulkan extension must be available and enabled for command buffer debug label region to work. See alsodraw_command_end_label().


voiddraw_command_end_label()🔗

Ends the command buffer debug label region started by adraw_command_begin_label() call.


voiddraw_command_insert_label(name:String, color:Color)🔗

Deprecated: Inserting labels no longer applies due to command reordering.

This method does nothing.


intdraw_list_begin(framebuffer:RID, draw_flags:BitField[DrawFlags] = 0, clear_color_values:PackedColorArray = PackedColorArray(), clear_depth_value:float = 1.0, clear_stencil_value:int = 0, region:Rect2 = Rect2(0, 0, 0, 0), breadcrumb:int = 0)🔗

Starts a list of raster drawing commands created with thedraw_* methods. The returned value should be passed to otherdraw_list_* functions.

Multiple draw lists cannot be created at the same time; you must finish the previous draw list first usingdraw_list_end().

A simple drawing operation might look like this (code is not a complete example):

varrd=RenderingDevice.new()varclear_colors=PackedColorArray([Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0)])vardraw_list=rd.draw_list_begin(framebuffers[i],RenderingDevice.CLEAR_COLOR_ALL,clear_colors,true,1.0f,true,0,Rect2(),RenderingDevice.OPAQUE_PASS)# Draw opaque.rd.draw_list_bind_render_pipeline(draw_list,raster_pipeline)rd.draw_list_bind_uniform_set(draw_list,raster_base_uniform,0)rd.draw_list_set_push_constant(draw_list,raster_push_constant,raster_push_constant.size())rd.draw_list_draw(draw_list,false,1,slice_triangle_count[i]*3)# Draw wire.rd.draw_list_bind_render_pipeline(draw_list,raster_pipeline_wire)rd.draw_list_bind_uniform_set(draw_list,raster_base_uniform,0)rd.draw_list_set_push_constant(draw_list,raster_push_constant,raster_push_constant.size())rd.draw_list_draw(draw_list,false,1,slice_triangle_count[i]*3)rd.draw_list_end()

Thedraw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. SeeRDTextureFormat ortexture_set_discardable().

Thebreadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Godot is built in dev or debug mode; when the GPU crashes Godot will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to.

It does not affect rendering behavior and can be set to 0. It is recommended to useBreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

rd.draw_list_begin(fb[i],RenderingDevice.CLEAR_COLOR_ALL,clear_colors,true,1.0f,true,0,Rect2(),RenderingDevice.OPAQUE_PASS|5)

intdraw_list_begin_for_screen(screen:int = 0, clear_color:Color = Color(0, 0, 0, 1))🔗

High-level variant ofdraw_list_begin(), with the parameters automatically being adjusted for drawing onto the window specified by thescreen ID.

Note: Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice,draw_list_begin_for_screen() returnsINVALID_ID.


PackedInt64Arraydraw_list_begin_split(framebuffer:RID, splits:int, initial_color_action:InitialAction, final_color_action:FinalAction, initial_depth_action:InitialAction, final_depth_action:FinalAction, clear_color_values:PackedColorArray = PackedColorArray(), clear_depth:float = 1.0, clear_stencil:int = 0, region:Rect2 = Rect2(0, 0, 0, 0), storage_textures:Array[RID] = [])🔗

Deprecated: Split draw lists are used automatically by RenderingDevice.

This method does nothing and always returns an emptyPackedInt64Array.


voiddraw_list_bind_index_array(draw_list:int, index_array:RID)🔗

Bindsindex_array to the specifieddraw_list.


voiddraw_list_bind_render_pipeline(draw_list:int, render_pipeline:RID)🔗

Bindsrender_pipeline to the specifieddraw_list.


voiddraw_list_bind_uniform_set(draw_list:int, uniform_set:RID, set_index:int)🔗

Bindsuniform_set to the specifieddraw_list. Aset_index must also be specified, which is an identifier starting from0 that must match the one expected by the draw list.


voiddraw_list_bind_vertex_array(draw_list:int, vertex_array:RID)🔗

Bindsvertex_array to the specifieddraw_list.


voiddraw_list_disable_scissor(draw_list:int)🔗

Removes and disables the scissor rectangle for the specifieddraw_list. See alsodraw_list_enable_scissor().


voiddraw_list_draw(draw_list:int, use_indices:bool, instances:int, procedural_vertex_count:int = 0)🔗

Submitsdraw_list for rendering on the GPU. This is the raster equivalent tocompute_list_dispatch().


voiddraw_list_draw_indirect(draw_list:int, use_indices:bool, buffer:RID, offset:int = 0, draw_count:int = 1, stride:int = 0)🔗

Submitsdraw_list for rendering on the GPU with the given parameters stored in thebuffer atoffset. Parameters being integers: vertex count, instance count, first vertex, first instance. And when using indices: index count, instance count, first index, vertex offset, first instance. Buffer must have been created withSTORAGE_BUFFER_USAGE_DISPATCH_INDIRECT flag.


voiddraw_list_enable_scissor(draw_list:int, rect:Rect2 = Rect2(0, 0, 0, 0))🔗

Creates a scissor rectangle and enables it for the specifieddraw_list. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See alsodraw_list_disable_scissor().

Note: The specifiedrect is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions.


voiddraw_list_end()🔗

Finishes a list of raster drawing commands created with thedraw_* methods.


voiddraw_list_set_blend_constants(draw_list:int, color:Color)🔗

Sets blend constants for the specifieddraw_list tocolor. Blend constants are used only if the graphics pipeline is created withDYNAMIC_STATE_BLEND_CONSTANTS flag set.


voiddraw_list_set_push_constant(draw_list:int, buffer:PackedByteArray, size_bytes:int)🔗

Sets the push constant data tobuffer for the specifieddraw_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified insize_bytes (this can be obtained by calling thePackedByteArray.size() method on the passedbuffer).


intdraw_list_switch_to_next_pass()🔗

Switches to the next draw pass.


PackedInt64Arraydraw_list_switch_to_next_pass_split(splits:int)🔗

Deprecated: Split draw lists are used automatically by RenderingDevice.

This method does nothing and always returns an emptyPackedInt64Array.


RIDframebuffer_create(textures:Array[RID], validate_with_format:int = -1, view_count:int = 1)🔗

Creates a new framebuffer. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


RIDframebuffer_create_empty(size:Vector2i, samples:TextureSamples = 0, validate_with_format:int = -1)🔗

Creates a new empty framebuffer. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


RIDframebuffer_create_multipass(textures:Array[RID], passes:Array[RDFramebufferPass], validate_with_format:int = -1, view_count:int = 1)🔗

Creates a new multipass framebuffer. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


intframebuffer_format_create(attachments:Array[RDAttachmentFormat], view_count:int = 1)🔗

Creates a new framebuffer format with the specifiedattachments andview_count. Returns the new framebuffer's unique framebuffer format ID.

Ifview_count is greater than or equal to2, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension.


intframebuffer_format_create_empty(samples:TextureSamples = 0)🔗

Creates a new empty framebuffer format with the specified number ofsamples and returns its ID.


intframebuffer_format_create_multipass(attachments:Array[RDAttachmentFormat], passes:Array[RDFramebufferPass], view_count:int = 1)🔗

Creates a multipass framebuffer format with the specifiedattachments,passes andview_count and returns its ID. Ifview_count is greater than or equal to2, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension.


TextureSamplesframebuffer_format_get_texture_samples(format:int, render_pass:int = 0)🔗

Returns the number of texture samples used for the given framebufferformat ID (returned byframebuffer_get_format()).


intframebuffer_get_format(framebuffer:RID)🔗

Returns the format ID of the framebuffer specified by theframebuffer RID. This ID is guaranteed to be unique for the same formats and does not need to be freed.


boolframebuffer_is_valid(framebuffer:RID)const🔗

Returnstrue if the framebuffer specified by theframebuffer RID is valid,false otherwise.


voidfree_rid(rid:RID)🔗

Tries to free an object in the RenderingDevice. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingDevice directly.


voidfull_barrier()🔗

Deprecated: Barriers are automatically inserted by RenderingDevice.

This method does nothing.


intget_captured_timestamp_cpu_time(index:int)const🔗

Returns the timestamp in CPU time for the rendering step specified byindex (in microseconds since the engine started). See alsoget_captured_timestamp_gpu_time() andcapture_timestamp().


intget_captured_timestamp_gpu_time(index:int)const🔗

Returns the timestamp in GPU time for the rendering step specified byindex (in microseconds since the engine started). See alsoget_captured_timestamp_cpu_time() andcapture_timestamp().


Stringget_captured_timestamp_name(index:int)const🔗

Returns the timestamp's name for the rendering step specified byindex. See alsocapture_timestamp().


intget_captured_timestamps_count()const🔗

Returns the total number of timestamps (rendering steps) available for profiling.


intget_captured_timestamps_frame()const🔗

Returns the index of the last frame rendered that has rendering timestamps available for querying.


intget_device_allocation_count()const🔗

Returns how many allocations the GPU has performed for internal driver structures.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


intget_device_allocs_by_object_type(type:int)const🔗

Same asget_device_allocation_count() but filtered for a given object type.

The type argument must be in range[0;get_tracked_object_type_count-1]. Ifget_tracked_object_type_count() is 0, then type argument is ignored and always returns 0.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


intget_device_memory_by_object_type(type:int)const🔗

Same asget_device_total_memory() but filtered for a given object type.

The type argument must be in range[0;get_tracked_object_type_count-1]. Ifget_tracked_object_type_count() is 0, then type argument is ignored and always returns 0.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


Stringget_device_name()const🔗

Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent toRenderingServer.get_video_adapter_name(). See alsoget_device_vendor_name().


Stringget_device_pipeline_cache_uuid()const🔗

Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache.


intget_device_total_memory()const🔗

Returns how much bytes the GPU is using.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


Stringget_device_vendor_name()const🔗

Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent toRenderingServer.get_video_adapter_vendor(). See alsoget_device_name().


intget_driver_allocation_count()const🔗

Returns how many allocations the GPU driver has performed for internal driver structures.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


intget_driver_allocs_by_object_type(type:int)const🔗

Same asget_driver_allocation_count() but filtered for a given object type.

The type argument must be in range[0;get_tracked_object_type_count-1]. Ifget_tracked_object_type_count() is 0, then type argument is ignored and always returns 0.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


Stringget_driver_and_device_memory_report()const🔗

Returns string report in CSV format using the following methods:

This is only used by Vulkan in debug builds. Godot must also be started with the--extra-gpu-memory-trackingcommand line argument.


intget_driver_memory_by_object_type(type:int)const🔗

Same asget_driver_total_memory() but filtered for a given object type.

The type argument must be in range[0;get_tracked_object_type_count-1]. Ifget_tracked_object_type_count() is 0, then type argument is ignored and always returns 0.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


intget_driver_resource(resource:DriverResource, rid:RID, index:int)🔗

Returns the unique identifier of the driverresource for the specifiedrid. Some driver resource types ignore the specifiedrid (seeDriverResource descriptions).index is always ignored but must be specified anyway.


intget_driver_total_memory()const🔗

Returns how much bytes the GPU driver is using for internal driver structures.

This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.


intget_frame_delay()const🔗

Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the mainRenderingDevice, frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, localRenderingDevices only have 1 frame.


intget_memory_usage(type:MemoryType)const🔗

Returns the memory usage in bytes corresponding to the giventype. When using Vulkan, these statistics are calculated byVulkan Memory Allocator.


Stringget_perf_report()const🔗

Returns a string with a performance report from the past frame. Updates every frame.


Stringget_tracked_object_name(type_index:int)const🔗

Returns the name of the type of object for the giventype_index. This value must be in range[0;get_tracked_object_type_count-1]. Ifget_tracked_object_type_count() is 0, then type argument is ignored and always returns the same string.

The return value is important because it gives meaning to the types passed toget_driver_memory_by_object_type(),get_driver_allocs_by_object_type(),get_device_memory_by_object_type(), andget_device_allocs_by_object_type(). Examples of strings it can return (not exhaustive):

  • DEVICE_MEMORY

  • PIPELINE_CACHE

  • SWAPCHAIN_KHR

  • COMMAND_POOL

Thus if e.g.get_tracked_object_name(5) returns "COMMAND_POOL", thenget_device_memory_by_object_type(5) returns the bytes used by the GPU for command pools.

This is only used by Vulkan in debug builds. Godot must also be started with the--extra-gpu-memory-trackingcommand line argument.


intget_tracked_object_type_count()const🔗

Returns how many types of trackable objects are.

This is only used by Vulkan in debug builds. Godot must also be started with the--extra-gpu-memory-trackingcommand line argument.


boolhas_feature(feature:Features)const🔗

Returnstrue if thefeature is supported by the GPU.


RIDindex_array_create(index_buffer:RID, index_offset:int, index_count:int)🔗

Creates a new index array. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


RIDindex_buffer_create(size_indices:int, format:IndexBufferFormat, data:PackedByteArray = PackedByteArray(), use_restart_indices:bool = false, creation_bits:BitField[BufferCreationBits] = 0)🔗

Creates a new index buffer. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


intlimit_get(limit:Limit)const🔗

Returns the value of the specifiedlimit. This limit varies depending on the current graphics hardware (and sometimes the driver version). If the given limit is exceeded, rendering errors will occur.

Limits for various graphics hardware can be found in theVulkan Hardware Database.


RIDrender_pipeline_create(shader:RID, framebuffer_format:int, vertex_format:int, primitive:RenderPrimitive, rasterization_state:RDPipelineRasterizationState, multisample_state:RDPipelineMultisampleState, stencil_state:RDPipelineDepthStencilState, color_blend_state:RDPipelineColorBlendState, dynamic_state_flags:BitField[PipelineDynamicStateFlags] = 0, for_render_pass:int = 0, specialization_constants:Array[RDPipelineSpecializationConstant] = [])🔗

Creates a new render pipeline. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


boolrender_pipeline_is_valid(render_pipeline:RID)🔗

Returnstrue if the render pipeline specified by therender_pipeline RID is valid,false otherwise.


RIDsampler_create(state:RDSamplerState)🔗

Creates a new sampler. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


boolsampler_is_format_supported_for_filter(format:DataFormat, sampler_filter:SamplerFilter)const🔗

Returnstrue if implementation supports using a texture offormat with the givensampler_filter.


intscreen_get_framebuffer_format(screen:int = 0)const🔗

Returns the framebuffer format of the given screen.

Note: Only the mainRenderingDevice returned byRenderingServer.get_rendering_device() has a format. If called on a localRenderingDevice, this method prints an error and returnsINVALID_ID.


intscreen_get_height(screen:int = 0)const🔗

Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being namedscreen, this returns thewindow size. See alsoscreen_get_width().

Note: Only the mainRenderingDevice returned byRenderingServer.get_rendering_device() has a height. If called on a localRenderingDevice, this method prints an error and returnsINVALID_ID.


intscreen_get_width(screen:int = 0)const🔗

Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being namedscreen, this returns thewindow size. See alsoscreen_get_height().

Note: Only the mainRenderingDevice returned byRenderingServer.get_rendering_device() has a width. If called on a localRenderingDevice, this method prints an error and returnsINVALID_ID.


voidset_resource_name(id:RID, name:String)🔗

Sets the resource name forid toname. This is used for debugging with third-party tools such asRenderDoc.

The following types of resources can be named: texture, sampler, vertex buffer, index buffer, uniform buffer, texture buffer, storage buffer, uniform set buffer, shader, render pipeline and compute pipeline. Framebuffers cannot be named. Attempting to name an incompatible resource type will print an error.

Note: Resource names are only set when the engine runs in verbose mode (OS.is_stdout_verbose() =true), or when using an engine build compiled with thedev_mode=yes SCons option. The graphics driver must also support theVK_EXT_DEBUG_UTILS_EXTENSION_NAME Vulkan extension for named resources to work.


PackedByteArrayshader_compile_binary_from_spirv(spirv_data:RDShaderSPIRV, name:String = "")🔗

Compiles a binary shader fromspirv_data and returns the compiled binary data as aPackedByteArray. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See alsoshader_compile_spirv_from_source().

name is an optional human-readable name that can be given to the compiled shader for organizational purposes.


RDShaderSPIRVshader_compile_spirv_from_source(shader_source:RDShaderSource, allow_cache:bool = true)🔗

Compiles a SPIR-V from the shader source code inshader_source and returns the SPIR-V as aRDShaderSPIRV. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader usingshader_compile_binary_from_spirv().

Ifallow_cache istrue, make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. Ifallow_cache isfalse, Godot's shader cache is ignored and the shader will always be recompiled.


RIDshader_create_from_bytecode(binary_data:PackedByteArray, placeholder_rid:RID = RID())🔗

Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method. See alsoshader_compile_binary_from_spirv() andshader_create_from_spirv().


RIDshader_create_from_spirv(spirv_data:RDShaderSPIRV, name:String = "")🔗

Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method. See alsoshader_compile_spirv_from_source() andshader_create_from_bytecode().


RIDshader_create_placeholder()🔗

Create a placeholder RID by allocating an RID without initializing it for use inshader_create_from_bytecode(). This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time.


intshader_get_vertex_input_attribute_mask(shader:RID)🔗

Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via.layout(location=...)) of the input variables (specified in GLSL by thein keyword).


RIDstorage_buffer_create(size_bytes:int, data:PackedByteArray = PackedByteArray(), usage:BitField[StorageBufferUsage] = 0, creation_bits:BitField[BufferCreationBits] = 0)🔗

Creates astorage buffer with the specifieddata andusage. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


voidsubmit()🔗

Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows callingsync()).

Note: Only available in local RenderingDevices.


voidsync()🔗

Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost.

Note: Only available in local RenderingDevices.

Note:sync() can only be called after asubmit().


RIDtexture_buffer_create(size_bytes:int, format:DataFormat, data:PackedByteArray = PackedByteArray())🔗

Creates a new texture buffer. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


Errortexture_clear(texture:RID, color:Color, base_mipmap:int, mipmap_count:int, base_layer:int, layer_count:int)🔗

Clears the specifiedtexture by replacing all of its pixels with the specifiedcolor.base_mipmap andmipmap_count determine which mipmaps of the texture are affected by this clear operation, whilebase_layer andlayer_count determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design),base_layer must be0 andlayer_count must be1.

Note:texture can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to clear this texture.


Errortexture_copy(from_texture:RID, to_texture:RID, from_pos:Vector3, to_pos:Vector3, size:Vector3, src_mipmap:int, dst_mipmap:int, src_layer:int, dst_layer:int)🔗

Copies thefrom_texture toto_texture with the specifiedfrom_pos,to_pos andsize coordinates. The Z axis of thefrom_pos,to_pos andsize must be0 for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being0 for textures without mipmaps or single-layer textures. Returns@GlobalScope.OK if the texture copy was successful or@GlobalScope.ERR_INVALID_PARAMETER otherwise.

Note:from_texture texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to copy this texture.

Note:from_texture texture requires theTEXTURE_USAGE_CAN_COPY_FROM_BIT to be retrieved.

Note:to_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to copy this texture.

Note:to_texture requires theTEXTURE_USAGE_CAN_COPY_TO_BIT to be retrieved.

Note:from_texture andto_texture must be of the same type (color or depth).


RIDtexture_create(format:RDTextureFormat, view:RDTextureView, data:Array[PackedByteArray] = [])🔗

Creates a new texture. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.

Note: Not to be confused withRenderingServer.texture_2d_create(), which creates the Godot-specificTexture2D resource as opposed to the graphics API's own texture type.


RIDtexture_create_from_extension(type:TextureType, format:DataFormat, samples:TextureSamples, usage_flags:BitField[TextureUsageBits], image:int, width:int, height:int, depth:int, layers:int)🔗

Returns an RID for an existingimage (VkImage) with the giventype,format,samples,usage_flags,width,height,depth, andlayers. This can be used to allow Godot to render onto foreign images.


RIDtexture_create_shared(view:RDTextureView, with_texture:RID)🔗

Creates a shared texture using the specifiedview and the texture information fromwith_texture.


RIDtexture_create_shared_from_slice(view:RDTextureView, with_texture:RID, layer:int, mipmap:int, mipmaps:int = 1, slice_type:TextureSliceType = 0)🔗

Creates a shared texture using the specifiedview and the texture information fromwith_texture'slayer andmipmap. The number of included mipmaps from the original texture can be controlled using themipmaps parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, usetexture_create_shared().

For 2D textures (which only have one layer),layer must be0.

Note: Layer slicing is only supported for 2D texture arrays, not 3D textures or cubemaps.


PackedByteArraytexture_get_data(texture:RID, layer:int)🔗

Returns thetexture data for the specifiedlayer as raw binary data. For 2D textures (which only have one layer),layer must be0.

Note:texture can't be retrieved while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to retrieve this texture. Otherwise, an error is printed and a emptyPackedByteArray is returned.

Note:texture requires theTEXTURE_USAGE_CAN_COPY_FROM_BIT to be retrieved. Otherwise, an error is printed and a emptyPackedByteArray is returned.

Note: This method will block the GPU from working until the data is retrieved. Refer totexture_get_data_async() for an alternative that returns the data in more performant way.


Errortexture_get_data_async(texture:RID, layer:int, callback:Callable)🔗

Asynchronous version oftexture_get_data(). RenderingDevice will callcallback in a certain amount of frames with the data the texture had at the time of the request.

Note: At the moment, the delay corresponds to the amount of frames specified byProjectSettings.rendering/rendering_device/vsync/frame_queue_size.

Note: Downloading large textures can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such asProjectSettings.rendering/rendering_device/staging_buffer/texture_download_region_size_px andProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb to improve the transfer speed at the cost of extra memory.

func_texture_get_data_callback(array):value=array.decode_u32(0)...rd.texture_get_data_async(texture,0,_texture_get_data_callback)

RDTextureFormattexture_get_format(texture:RID)🔗

Returns the data format used to create this texture.


inttexture_get_native_handle(texture:RID)🔗

Deprecated: Useget_driver_resource() withDRIVER_RESOURCE_TEXTURE instead.

Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension.

Note: This function returns auint64_t which internally maps to aGLuint (OpenGL) orVkImage (Vulkan).


booltexture_is_discardable(texture:RID)🔗

Returnstrue if thetexture is discardable,false otherwise. SeeRDTextureFormat ortexture_set_discardable().


booltexture_is_format_supported_for_usage(format:DataFormat, usage_flags:BitField[TextureUsageBits])const🔗

Returnstrue if the specifiedformat is supported for the givenusage_flags,false otherwise.


booltexture_is_shared(texture:RID)🔗

Returnstrue if thetexture is shared,false otherwise. SeeRDTextureView.


booltexture_is_valid(texture:RID)🔗

Returnstrue if thetexture is valid,false otherwise.


Errortexture_resolve_multisample(from_texture:RID, to_texture:RID)🔗

Resolves thefrom_texture texture ontoto_texture with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns@GlobalScope.OK if successful,@GlobalScope.ERR_INVALID_PARAMETER otherwise.

Note:from_texture andto_texture textures must have the same dimension, format and type (color or depth).

Note:from_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to resolve this texture.

Note:from_texture requires theTEXTURE_USAGE_CAN_COPY_FROM_BIT to be retrieved.

Note:from_texture must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture).

Note:to_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to resolve this texture.

Note:to_texture texture requires theTEXTURE_USAGE_CAN_COPY_TO_BIT to be retrieved.

Note:to_texture texture mustnot be multisampled and must also be 2D (or a slice of a 3D/cubemap texture).


voidtexture_set_discardable(texture:RID, discardable:bool)🔗

Updates the discardable property oftexture.

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 byRenderingDevice to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance.


Errortexture_update(texture:RID, layer:int, data:PackedByteArray)🔗

Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer),layer must be0. Returns@GlobalScope.OK if the update was successful,@GlobalScope.ERR_INVALID_PARAMETER otherwise.

Note: Updating textures is forbidden during creation of a draw or compute list.

Note: The existingtexture can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set toFINAL_ACTION_CONTINUE) to update this texture.

Note: The existingtexture requires theTEXTURE_USAGE_CAN_UPDATE_BIT to be updatable.


RIDuniform_buffer_create(size_bytes:int, data:PackedByteArray = PackedByteArray(), creation_bits:BitField[BufferCreationBits] = 0)🔗

Creates a new uniform buffer. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


RIDuniform_set_create(uniforms:Array[RDUniform], shader:RID, shader_set:int)🔗

Creates a new uniform set. It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


booluniform_set_is_valid(uniform_set:RID)🔗

Checks if theuniform_set is valid, i.e. is owned.


RIDvertex_array_create(vertex_count:int, vertex_format:int, src_buffers:Array[RID], offsets:PackedInt64Array = PackedInt64Array())🔗

Creates a vertex array based on the specified buffers. Optionally,offsets (in bytes) may be defined for each buffer.


RIDvertex_buffer_create(size_bytes:int, data:PackedByteArray = PackedByteArray(), creation_bits:BitField[BufferCreationBits] = 0)🔗

It can be accessed with the RID that is returned.

Once finished with your RID, you will want to free the RID using the RenderingDevice'sfree_rid() method.


intvertex_format_create(vertex_descriptions:Array[RDVertexAttribute])🔗

Creates a new vertex format with the specifiedvertex_descriptions. Returns a unique vertex format ID corresponding to the newly created vertex format.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.