pub struct RenderCommandEncoder(/* private fields */);Expand description
A command encoder for rendering operations.
C++ equivalent: MTL::RenderCommandEncoder
Render encoders are used to encode drawing commands, set render state, and bind resources for rendering operations.
Implementations§
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn memory_barrier_with_scope(
&self,
scope: BarrierScope,
after_stages: RenderStages,
before_stages: RenderStages,
)
pub fn memory_barrier_with_scope( &self, scope: BarrierScope, after_stages: RenderStages, before_stages: RenderStages, )
Insert a memory barrier with scope.
C++ equivalent: void memoryBarrier(MTL::BarrierScope, MTL::RenderStages, MTL::RenderStages)
Sourcepub fn texture_barrier(&self)
pub fn texture_barrier(&self)
Insert a texture barrier (deprecated).
C++ equivalent: void textureBarrier()
Sourcepub unsafe fn memory_barrier_with_resources_ptr(
&self,
resources: *const *const c_void,
count: UInteger,
after_stages: RenderStages,
before_stages: RenderStages,
)
pub unsafe fn memory_barrier_with_resources_ptr( &self, resources: *const *const c_void, count: UInteger, after_stages: RenderStages, before_stages: RenderStages, )
Insert a memory barrier for specific resources (raw pointer version).
C++ equivalent: void memoryBarrier(const Resource* const*, NS::UInteger, MTL::RenderStages, MTL::RenderStages)
§Safety
The resources pointer must be a valid array with the specified count.
Sourcepub unsafe fn use_resource_ptr(
&self,
resource: *const c_void,
usage: ResourceUsage,
)
pub unsafe fn use_resource_ptr( &self, resource: *const c_void, usage: ResourceUsage, )
Declare that a resource will be used (raw pointer version).
C++ equivalent: void useResource(const Resource*, MTL::ResourceUsage)
§Safety
The resource pointer must be a valid Metal resource object.
Sourcepub unsafe fn use_resource_ptr_with_stages(
&self,
resource: *const c_void,
usage: ResourceUsage,
stages: RenderStages,
)
pub unsafe fn use_resource_ptr_with_stages( &self, resource: *const c_void, usage: ResourceUsage, stages: RenderStages, )
Declare that a resource will be used with stages (raw pointer version).
C++ equivalent: void useResource(const Resource*, MTL::ResourceUsage, MTL::RenderStages)
§Safety
The resource pointer must be a valid Metal resource object.
Sourcepub fn use_buffer(&self, buffer: &Buffer, usage: ResourceUsage)
pub fn use_buffer(&self, buffer: &Buffer, usage: ResourceUsage)
Declare that a buffer will be used.
C++ equivalent: void useResource(const Resource*, MTL::ResourceUsage)
Sourcepub fn use_texture(&self, texture: &Texture, usage: ResourceUsage)
pub fn use_texture(&self, texture: &Texture, usage: ResourceUsage)
Declare that a texture will be used.
C++ equivalent: void useResource(const Resource*, MTL::ResourceUsage)
Sourcepub unsafe fn use_heap_ptr(&self, heap: *const c_void)
pub unsafe fn use_heap_ptr(&self, heap: *const c_void)
Declare that a heap will be used (raw pointer version).
C++ equivalent: void useHeap(const Heap*)
§Safety
The heap pointer must be a valid Metal heap object.
Sourcepub fn use_heap(&self, heap: &Heap)
pub fn use_heap(&self, heap: &Heap)
Declare that a heap will be used.
C++ equivalent: void useHeap(const Heap*)
Sourcepub unsafe fn use_heap_ptr_with_stages(
&self,
heap: *const c_void,
stages: RenderStages,
)
pub unsafe fn use_heap_ptr_with_stages( &self, heap: *const c_void, stages: RenderStages, )
Declare that a heap will be used with stages (raw pointer version).
C++ equivalent: void useHeap(const Heap*, MTL::RenderStages)
§Safety
The heap pointer must be a valid Metal heap object.
Sourcepub unsafe fn use_heaps_ptr(&self, heaps: *const *const c_void, count: UInteger)
pub unsafe fn use_heaps_ptr(&self, heaps: *const *const c_void, count: UInteger)
Declare that multiple heaps will be used (raw pointer version).
C++ equivalent: void useHeaps(const Heap* const*, NS::UInteger)
§Safety
The heaps pointer must be a valid array of heap pointers with the specified count.
Sourcepub unsafe fn use_heaps_with_stages_ptr(
&self,
heaps: *const *const c_void,
count: UInteger,
stages: RenderStages,
)
pub unsafe fn use_heaps_with_stages_ptr( &self, heaps: *const *const c_void, count: UInteger, stages: RenderStages, )
Declare that multiple heaps will be used with stages (raw pointer version).
C++ equivalent: void useHeaps(const Heap* const*, NS::UInteger, MTL::RenderStages)
§Safety
The heaps pointer must be a valid array of heap pointers with the specified count.
Sourcepub unsafe fn use_resources_ptr(
&self,
resources: *const *const c_void,
count: UInteger,
usage: ResourceUsage,
)
pub unsafe fn use_resources_ptr( &self, resources: *const *const c_void, count: UInteger, usage: ResourceUsage, )
Declare that multiple resources will be used (raw pointer version).
C++ equivalent: void useResources(const Resource* const*, NS::UInteger, MTL::ResourceUsage)
§Safety
The resources pointer must be a valid array of resource pointers with the specified count.
Sourcepub unsafe fn use_resources_with_stages_ptr(
&self,
resources: *const *const c_void,
count: UInteger,
usage: ResourceUsage,
stages: RenderStages,
)
pub unsafe fn use_resources_with_stages_ptr( &self, resources: *const *const c_void, count: UInteger, usage: ResourceUsage, stages: RenderStages, )
Declare that multiple resources will be used with stages (raw pointer version).
C++ equivalent: void useResources(const Resource* const*, NS::UInteger, MTL::ResourceUsage, MTL::RenderStages)
§Safety
The resources pointer must be a valid array of resource pointers with the specified count.
Sourcepub unsafe fn update_fence_ptr(
&self,
fence: *const c_void,
stages: RenderStages,
)
pub unsafe fn update_fence_ptr( &self, fence: *const c_void, stages: RenderStages, )
Update a fence (raw pointer version).
C++ equivalent: void updateFence(const Fence*, MTL::RenderStages)
§Safety
The fence pointer must be a valid Metal fence object.
Sourcepub fn update_fence(&self, fence: &Fence, stages: RenderStages)
pub fn update_fence(&self, fence: &Fence, stages: RenderStages)
Update a fence.
C++ equivalent: void updateFence(const Fence*, MTL::RenderStages)
Sourcepub unsafe fn wait_for_fence_ptr(
&self,
fence: *const c_void,
stages: RenderStages,
)
pub unsafe fn wait_for_fence_ptr( &self, fence: *const c_void, stages: RenderStages, )
Wait for a fence (raw pointer version).
C++ equivalent: void waitForFence(const Fence*, MTL::RenderStages)
§Safety
The fence pointer must be a valid Metal fence object.
Sourcepub fn wait_for_fence(&self, fence: &Fence, stages: RenderStages)
pub fn wait_for_fence(&self, fence: &Fence, stages: RenderStages)
Wait for a fence.
C++ equivalent: void waitForFence(const Fence*, MTL::RenderStages)
Sourcepub fn set_vertex_amplification_count(
&self,
count: UInteger,
view_mappings: Option<&[VertexAmplificationViewMapping]>,
)
pub fn set_vertex_amplification_count( &self, count: UInteger, view_mappings: Option<&[VertexAmplificationViewMapping]>, )
Set vertex amplification count.
C++ equivalent: void setVertexAmplificationCount(NS::UInteger, const VertexAmplificationViewMapping*)
Sourcepub unsafe fn set_vertex_acceleration_structure_ptr(
&self,
acceleration_structure: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_vertex_acceleration_structure_ptr( &self, acceleration_structure: *const c_void, buffer_index: UInteger, )
Set a vertex acceleration structure (raw pointer version).
C++ equivalent: void setVertexAccelerationStructure(const AccelerationStructure*, NS::UInteger)
§Safety
The acceleration structure pointer must be valid.
Sourcepub fn set_vertex_acceleration_structure(
&self,
acceleration_structure: &AccelerationStructure,
buffer_index: UInteger,
)
pub fn set_vertex_acceleration_structure( &self, acceleration_structure: &AccelerationStructure, buffer_index: UInteger, )
Set a vertex acceleration structure.
C++ equivalent: void setVertexAccelerationStructure(const AccelerationStructure*, NS::UInteger)
Sourcepub unsafe fn set_fragment_acceleration_structure_ptr(
&self,
acceleration_structure: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_fragment_acceleration_structure_ptr( &self, acceleration_structure: *const c_void, buffer_index: UInteger, )
Set a fragment acceleration structure (raw pointer version).
C++ equivalent: void setFragmentAccelerationStructure(const AccelerationStructure*, NS::UInteger)
§Safety
The acceleration structure pointer must be valid.
Sourcepub fn set_fragment_acceleration_structure(
&self,
acceleration_structure: &AccelerationStructure,
buffer_index: UInteger,
)
pub fn set_fragment_acceleration_structure( &self, acceleration_structure: &AccelerationStructure, buffer_index: UInteger, )
Set a fragment acceleration structure.
C++ equivalent: void setFragmentAccelerationStructure(const AccelerationStructure*, NS::UInteger)
Sourcepub unsafe fn set_tile_acceleration_structure_ptr(
&self,
acceleration_structure: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_tile_acceleration_structure_ptr( &self, acceleration_structure: *const c_void, buffer_index: UInteger, )
Set a tile acceleration structure (raw pointer version).
C++ equivalent: void setTileAccelerationStructure(const AccelerationStructure*, NS::UInteger)
§Safety
The acceleration structure pointer must be valid.
Sourcepub fn set_tile_acceleration_structure(
&self,
acceleration_structure: &AccelerationStructure,
buffer_index: UInteger,
)
pub fn set_tile_acceleration_structure( &self, acceleration_structure: &AccelerationStructure, buffer_index: UInteger, )
Set a tile acceleration structure.
C++ equivalent: void setTileAccelerationStructure(const AccelerationStructure*, NS::UInteger)
Sourcepub unsafe fn set_vertex_visible_function_table_ptr(
&self,
function_table: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_vertex_visible_function_table_ptr( &self, function_table: *const c_void, buffer_index: UInteger, )
Set a vertex visible function table (raw pointer version).
C++ equivalent: void setVertexVisibleFunctionTable(const VisibleFunctionTable*, NS::UInteger)
§Safety
The function table pointer must be valid.
Sourcepub unsafe fn set_vertex_visible_function_tables_ptr(
&self,
function_tables: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_visible_function_tables_ptr( &self, function_tables: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple vertex visible function tables (raw pointer version).
C++ equivalent: void setVertexVisibleFunctionTables(const VisibleFunctionTable* const*, NS::Range)
§Safety
The function tables pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_vertex_intersection_function_table_ptr(
&self,
function_table: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_vertex_intersection_function_table_ptr( &self, function_table: *const c_void, buffer_index: UInteger, )
Set a vertex intersection function table (raw pointer version).
C++ equivalent: void setVertexIntersectionFunctionTable(const IntersectionFunctionTable*, NS::UInteger)
§Safety
The function table pointer must be valid.
Sourcepub unsafe fn set_vertex_intersection_function_tables_ptr(
&self,
function_tables: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_intersection_function_tables_ptr( &self, function_tables: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple vertex intersection function tables (raw pointer version).
C++ equivalent: void setVertexIntersectionFunctionTables(const IntersectionFunctionTable* const*, NS::Range)
§Safety
The function tables pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_fragment_visible_function_table_ptr(
&self,
function_table: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_fragment_visible_function_table_ptr( &self, function_table: *const c_void, buffer_index: UInteger, )
Set a fragment visible function table (raw pointer version).
C++ equivalent: void setFragmentVisibleFunctionTable(const VisibleFunctionTable*, NS::UInteger)
§Safety
The function table pointer must be valid.
Sourcepub unsafe fn set_fragment_visible_function_tables_ptr(
&self,
function_tables: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_fragment_visible_function_tables_ptr( &self, function_tables: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple fragment visible function tables (raw pointer version).
C++ equivalent: void setFragmentVisibleFunctionTables(const VisibleFunctionTable* const*, NS::Range)
§Safety
The function tables pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_fragment_intersection_function_table_ptr(
&self,
function_table: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_fragment_intersection_function_table_ptr( &self, function_table: *const c_void, buffer_index: UInteger, )
Set a fragment intersection function table (raw pointer version).
C++ equivalent: void setFragmentIntersectionFunctionTable(const IntersectionFunctionTable*, NS::UInteger)
§Safety
The function table pointer must be valid.
Sourcepub unsafe fn set_fragment_intersection_function_tables_ptr(
&self,
function_tables: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_fragment_intersection_function_tables_ptr( &self, function_tables: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple fragment intersection function tables (raw pointer version).
C++ equivalent: void setFragmentIntersectionFunctionTables(const IntersectionFunctionTable* const*, NS::Range)
§Safety
The function tables pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_tile_visible_function_table_ptr(
&self,
function_table: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_tile_visible_function_table_ptr( &self, function_table: *const c_void, buffer_index: UInteger, )
Set a tile visible function table (raw pointer version).
C++ equivalent: void setTileVisibleFunctionTable(const VisibleFunctionTable*, NS::UInteger)
§Safety
The function table pointer must be valid.
Sourcepub unsafe fn set_tile_visible_function_tables_ptr(
&self,
function_tables: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_tile_visible_function_tables_ptr( &self, function_tables: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple tile visible function tables (raw pointer version).
C++ equivalent: void setTileVisibleFunctionTables(const VisibleFunctionTable* const*, NS::Range)
§Safety
The function tables pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_tile_intersection_function_table_ptr(
&self,
function_table: *const c_void,
buffer_index: UInteger,
)
pub unsafe fn set_tile_intersection_function_table_ptr( &self, function_table: *const c_void, buffer_index: UInteger, )
Set a tile intersection function table (raw pointer version).
C++ equivalent: void setTileIntersectionFunctionTable(const IntersectionFunctionTable*, NS::UInteger)
§Safety
The function table pointer must be valid.
Sourcepub unsafe fn set_tile_intersection_function_tables_ptr(
&self,
function_tables: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_tile_intersection_function_tables_ptr( &self, function_tables: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple tile intersection function tables (raw pointer version).
C++ equivalent: void setTileIntersectionFunctionTables(const IntersectionFunctionTable* const*, NS::Range)
§Safety
The function tables pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn execute_commands_in_buffer_ptr(
&self,
indirect_command_buffer: *const c_void,
offset: UInteger,
length: UInteger,
)
pub unsafe fn execute_commands_in_buffer_ptr( &self, indirect_command_buffer: *const c_void, offset: UInteger, length: UInteger, )
Execute commands from an indirect command buffer (raw pointer version).
C++ equivalent: void executeCommandsInBuffer(const IndirectCommandBuffer*, NS::Range)
§Safety
The indirect command buffer pointer must be valid.
Sourcepub unsafe fn execute_commands_in_buffer_with_indirect_range_ptr(
&self,
indirect_command_buffer: *const c_void,
indirect_range_buffer: *const c_void,
indirect_buffer_offset: UInteger,
)
pub unsafe fn execute_commands_in_buffer_with_indirect_range_ptr( &self, indirect_command_buffer: *const c_void, indirect_range_buffer: *const c_void, indirect_buffer_offset: UInteger, )
Execute commands from an indirect command buffer with indirect range (raw pointer version).
C++ equivalent: void executeCommandsInBuffer(const IndirectCommandBuffer*, const Buffer*, NS::UInteger)
§Safety
The indirect command buffer and range buffer pointers must be valid.
Sourcepub unsafe fn sample_counters_in_buffer_ptr(
&self,
sample_buffer: *const c_void,
sample_index: UInteger,
barrier: bool,
)
pub unsafe fn sample_counters_in_buffer_ptr( &self, sample_buffer: *const c_void, sample_index: UInteger, barrier: bool, )
Sample counters (raw pointer version).
C++ equivalent: void sampleCountersInBuffer(...)
§Safety
The sample buffer pointer must be a valid counter sample buffer object.
Sourcepub unsafe fn set_color_attachment_map_ptr(&self, mapping: *const c_void)
pub unsafe fn set_color_attachment_map_ptr(&self, mapping: *const c_void)
Set the color attachment map (raw pointer version).
C++ equivalent: void setColorAttachmentMap(const LogicalToPhysicalColorAttachmentMap*)
§Safety
The mapping pointer must be valid.
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn set_vertex_buffer(
&self,
buffer: &Buffer,
offset: UInteger,
index: UInteger,
)
pub fn set_vertex_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )
Set a vertex buffer.
C++ equivalent: void setVertexBuffer(const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn set_vertex_buffer_with_stride(
&self,
buffer: &Buffer,
offset: UInteger,
stride: UInteger,
index: UInteger,
)
pub fn set_vertex_buffer_with_stride( &self, buffer: &Buffer, offset: UInteger, stride: UInteger, index: UInteger, )
Set a vertex buffer with attribute stride.
C++ equivalent: void setVertexBuffer(const Buffer*, NS::UInteger, NS::UInteger, NS::UInteger)
Sourcepub fn set_vertex_buffer_offset(&self, offset: UInteger, index: UInteger)
pub fn set_vertex_buffer_offset(&self, offset: UInteger, index: UInteger)
Set the vertex buffer offset.
C++ equivalent: void setVertexBufferOffset(NS::UInteger, NS::UInteger)
Sourcepub fn set_vertex_bytes(&self, bytes: &[u8], index: UInteger)
pub fn set_vertex_bytes(&self, bytes: &[u8], index: UInteger)
Set inline vertex bytes.
C++ equivalent: void setVertexBytes(const void*, NS::UInteger, NS::UInteger)
Sourcepub fn set_vertex_bytes_with_stride(
&self,
bytes: &[u8],
stride: UInteger,
index: UInteger,
)
pub fn set_vertex_bytes_with_stride( &self, bytes: &[u8], stride: UInteger, index: UInteger, )
Set inline vertex bytes with attribute stride.
C++ equivalent: void setVertexBytes(const void*, NS::UInteger, NS::UInteger, NS::UInteger)
Sourcepub fn set_vertex_buffer_offset_with_stride(
&self,
offset: UInteger,
stride: UInteger,
index: UInteger,
)
pub fn set_vertex_buffer_offset_with_stride( &self, offset: UInteger, stride: UInteger, index: UInteger, )
Set the vertex buffer offset with attribute stride.
C++ equivalent: void setVertexBufferOffset(NS::UInteger, NS::UInteger, NS::UInteger)
Sourcepub unsafe fn set_vertex_buffers_ptr(
&self,
buffers: *const *const c_void,
offsets: *const UInteger,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_buffers_ptr( &self, buffers: *const *const c_void, offsets: *const UInteger, range_location: UInteger, range_length: UInteger, )
Set multiple vertex buffers at a range of indices (raw pointer version).
C++ equivalent: void setVertexBuffers(const Buffer* const*, const NS::UInteger*, NS::Range)
§Safety
The buffers and offsets pointers must be valid arrays with at least range.length elements.
Sourcepub unsafe fn set_vertex_buffers_with_strides_ptr(
&self,
buffers: *const *const c_void,
offsets: *const UInteger,
strides: *const UInteger,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_buffers_with_strides_ptr( &self, buffers: *const *const c_void, offsets: *const UInteger, strides: *const UInteger, range_location: UInteger, range_length: UInteger, )
Set multiple vertex buffers with strides at a range of indices (raw pointer version).
C++ equivalent: void setVertexBuffers(const Buffer* const*, const NS::UInteger*, const NS::UInteger*, NS::Range)
§Safety
The buffers, offsets, and strides pointers must be valid arrays with at least range.length elements.
Sourcepub fn set_vertex_texture(&self, texture: &Texture, index: UInteger)
pub fn set_vertex_texture(&self, texture: &Texture, index: UInteger)
Set a vertex texture.
C++ equivalent: void setVertexTexture(const Texture*, NS::UInteger)
Sourcepub unsafe fn set_vertex_textures_ptr(
&self,
textures: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_textures_ptr( &self, textures: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple vertex textures at a range of indices (raw pointer version).
C++ equivalent: void setVertexTextures(const Texture* const*, NS::Range)
§Safety
The textures pointer must be a valid array with at least range.length elements.
Sourcepub fn set_vertex_sampler_state(&self, sampler: &SamplerState, index: UInteger)
pub fn set_vertex_sampler_state(&self, sampler: &SamplerState, index: UInteger)
Set a vertex sampler state.
C++ equivalent: void setVertexSamplerState(const SamplerState*, NS::UInteger)
Sourcepub fn set_vertex_sampler_state_with_lod_clamps(
&self,
sampler: &SamplerState,
lod_min_clamp: f32,
lod_max_clamp: f32,
index: UInteger,
)
pub fn set_vertex_sampler_state_with_lod_clamps( &self, sampler: &SamplerState, lod_min_clamp: f32, lod_max_clamp: f32, index: UInteger, )
Set a vertex sampler state with LOD clamps.
C++ equivalent: void setVertexSamplerState(const SamplerState*, float, float, NS::UInteger)
Sourcepub unsafe fn set_vertex_sampler_states_ptr(
&self,
samplers: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_sampler_states_ptr( &self, samplers: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple vertex sampler states at a range of indices (raw pointer version).
C++ equivalent: void setVertexSamplerStates(const SamplerState* const*, NS::Range)
§Safety
The samplers pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_vertex_sampler_states_with_lod_clamps_ptr(
&self,
samplers: *const *const c_void,
lod_min_clamps: *const f32,
lod_max_clamps: *const f32,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_vertex_sampler_states_with_lod_clamps_ptr( &self, samplers: *const *const c_void, lod_min_clamps: *const f32, lod_max_clamps: *const f32, range_location: UInteger, range_length: UInteger, )
Set multiple vertex sampler states with LOD clamps at a range of indices (raw pointer version).
C++ equivalent: void setVertexSamplerStates(const SamplerState* const*, const float*, const float*, NS::Range)
§Safety
The samplers, lod_min_clamps, and lod_max_clamps pointers must be valid arrays with at least range.length elements.
Sourcepub fn set_fragment_buffer(
&self,
buffer: &Buffer,
offset: UInteger,
index: UInteger,
)
pub fn set_fragment_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )
Set a fragment buffer.
C++ equivalent: void setFragmentBuffer(const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn set_fragment_buffer_offset(&self, offset: UInteger, index: UInteger)
pub fn set_fragment_buffer_offset(&self, offset: UInteger, index: UInteger)
Set the fragment buffer offset.
C++ equivalent: void setFragmentBufferOffset(NS::UInteger, NS::UInteger)
Sourcepub fn set_fragment_bytes(&self, bytes: &[u8], index: UInteger)
pub fn set_fragment_bytes(&self, bytes: &[u8], index: UInteger)
Set inline fragment bytes.
C++ equivalent: void setFragmentBytes(const void*, NS::UInteger, NS::UInteger)
Sourcepub unsafe fn set_fragment_buffers_ptr(
&self,
buffers: *const *const c_void,
offsets: *const UInteger,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_fragment_buffers_ptr( &self, buffers: *const *const c_void, offsets: *const UInteger, range_location: UInteger, range_length: UInteger, )
Set multiple fragment buffers at a range of indices (raw pointer version).
C++ equivalent: void setFragmentBuffers(const Buffer* const*, const NS::UInteger*, NS::Range)
§Safety
The buffers and offsets pointers must be valid arrays with at least range.length elements.
Sourcepub fn set_fragment_texture(&self, texture: &Texture, index: UInteger)
pub fn set_fragment_texture(&self, texture: &Texture, index: UInteger)
Set a fragment texture.
C++ equivalent: void setFragmentTexture(const Texture*, NS::UInteger)
Sourcepub unsafe fn set_fragment_textures_ptr(
&self,
textures: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_fragment_textures_ptr( &self, textures: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple fragment textures at a range of indices (raw pointer version).
C++ equivalent: void setFragmentTextures(const Texture* const*, NS::Range)
§Safety
The textures pointer must be a valid array with at least range.length elements.
Sourcepub fn set_fragment_sampler_state(
&self,
sampler: &SamplerState,
index: UInteger,
)
pub fn set_fragment_sampler_state( &self, sampler: &SamplerState, index: UInteger, )
Set a fragment sampler state.
C++ equivalent: void setFragmentSamplerState(const SamplerState*, NS::UInteger)
Sourcepub fn set_fragment_sampler_state_with_lod_clamps(
&self,
sampler: &SamplerState,
lod_min_clamp: f32,
lod_max_clamp: f32,
index: UInteger,
)
pub fn set_fragment_sampler_state_with_lod_clamps( &self, sampler: &SamplerState, lod_min_clamp: f32, lod_max_clamp: f32, index: UInteger, )
Set a fragment sampler state with LOD clamps.
C++ equivalent: void setFragmentSamplerState(const SamplerState*, float, float, NS::UInteger)
Sourcepub unsafe fn set_fragment_sampler_states_ptr(
&self,
samplers: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_fragment_sampler_states_ptr( &self, samplers: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple fragment sampler states at a range of indices (raw pointer version).
C++ equivalent: void setFragmentSamplerStates(const SamplerState* const*, NS::Range)
§Safety
The samplers pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_fragment_sampler_states_with_lod_clamps_ptr(
&self,
samplers: *const *const c_void,
lod_min_clamps: *const f32,
lod_max_clamps: *const f32,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_fragment_sampler_states_with_lod_clamps_ptr( &self, samplers: *const *const c_void, lod_min_clamps: *const f32, lod_max_clamps: *const f32, range_location: UInteger, range_length: UInteger, )
Set multiple fragment sampler states with LOD clamps at a range of indices (raw pointer version).
C++ equivalent: void setFragmentSamplerStates(const SamplerState* const*, const float*, const float*, NS::Range)
§Safety
The samplers, lod_min_clamps, and lod_max_clamps pointers must be valid arrays with at least range.length elements.
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn draw_primitives(
&self,
primitive_type: PrimitiveType,
vertex_start: UInteger,
vertex_count: UInteger,
)
pub fn draw_primitives( &self, primitive_type: PrimitiveType, vertex_start: UInteger, vertex_count: UInteger, )
Draw primitives.
C++ equivalent: void drawPrimitives(MTL::PrimitiveType, NS::UInteger, NS::UInteger)
Sourcepub fn draw_primitives_instanced(
&self,
primitive_type: PrimitiveType,
vertex_start: UInteger,
vertex_count: UInteger,
instance_count: UInteger,
)
pub fn draw_primitives_instanced( &self, primitive_type: PrimitiveType, vertex_start: UInteger, vertex_count: UInteger, instance_count: UInteger, )
Draw primitives with instance count.
C++ equivalent: void drawPrimitives(MTL::PrimitiveType, NS::UInteger, NS::UInteger, NS::UInteger)
Sourcepub fn draw_primitives_instanced_base_instance(
&self,
primitive_type: PrimitiveType,
vertex_start: UInteger,
vertex_count: UInteger,
instance_count: UInteger,
base_instance: UInteger,
)
pub fn draw_primitives_instanced_base_instance( &self, primitive_type: PrimitiveType, vertex_start: UInteger, vertex_count: UInteger, instance_count: UInteger, base_instance: UInteger, )
Draw primitives with instance count and base instance.
C++ equivalent: void drawPrimitives(MTL::PrimitiveType, NS::UInteger, NS::UInteger, NS::UInteger, NS::UInteger)
Sourcepub fn draw_primitives_indirect(
&self,
primitive_type: PrimitiveType,
indirect_buffer: &Buffer,
indirect_buffer_offset: UInteger,
)
pub fn draw_primitives_indirect( &self, primitive_type: PrimitiveType, indirect_buffer: &Buffer, indirect_buffer_offset: UInteger, )
Draw primitives using an indirect buffer.
C++ equivalent: void drawPrimitives(MTL::PrimitiveType, const Buffer*, NS::UInteger)
Sourcepub fn draw_indexed_primitives(
&self,
primitive_type: PrimitiveType,
index_count: UInteger,
index_type: IndexType,
index_buffer: &Buffer,
index_buffer_offset: UInteger,
)
pub fn draw_indexed_primitives( &self, primitive_type: PrimitiveType, index_count: UInteger, index_type: IndexType, index_buffer: &Buffer, index_buffer_offset: UInteger, )
Draw indexed primitives.
C++ equivalent: void drawIndexedPrimitives(MTL::PrimitiveType, NS::UInteger, MTL::IndexType, const Buffer*, NS::UInteger)
Sourcepub fn draw_indexed_primitives_instanced(
&self,
primitive_type: PrimitiveType,
index_count: UInteger,
index_type: IndexType,
index_buffer: &Buffer,
index_buffer_offset: UInteger,
instance_count: UInteger,
)
pub fn draw_indexed_primitives_instanced( &self, primitive_type: PrimitiveType, index_count: UInteger, index_type: IndexType, index_buffer: &Buffer, index_buffer_offset: UInteger, instance_count: UInteger, )
Draw indexed primitives with instance count.
C++ equivalent: void drawIndexedPrimitives(MTL::PrimitiveType, NS::UInteger, MTL::IndexType, const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn draw_indexed_primitives_instanced_base_vertex_base_instance(
&self,
primitive_type: PrimitiveType,
index_count: UInteger,
index_type: IndexType,
index_buffer: &Buffer,
index_buffer_offset: UInteger,
instance_count: UInteger,
base_vertex: Integer,
base_instance: UInteger,
)
pub fn draw_indexed_primitives_instanced_base_vertex_base_instance( &self, primitive_type: PrimitiveType, index_count: UInteger, index_type: IndexType, index_buffer: &Buffer, index_buffer_offset: UInteger, instance_count: UInteger, base_vertex: Integer, base_instance: UInteger, )
Draw indexed primitives with base vertex and base instance.
C++ equivalent: void drawIndexedPrimitives(...instanceCount: baseVertex: baseInstance:)
Sourcepub fn draw_indexed_primitives_indirect(
&self,
primitive_type: PrimitiveType,
index_type: IndexType,
index_buffer: &Buffer,
index_buffer_offset: UInteger,
indirect_buffer: &Buffer,
indirect_buffer_offset: UInteger,
)
pub fn draw_indexed_primitives_indirect( &self, primitive_type: PrimitiveType, index_type: IndexType, index_buffer: &Buffer, index_buffer_offset: UInteger, indirect_buffer: &Buffer, indirect_buffer_offset: UInteger, )
Draw indexed primitives using an indirect buffer.
C++ equivalent: void drawIndexedPrimitives(MTL::PrimitiveType, MTL::IndexType, const Buffer*, NS::UInteger, const Buffer*, NS::UInteger)
Sourcepub fn set_tessellation_factor_buffer(
&self,
buffer: &Buffer,
offset: UInteger,
instance_stride: UInteger,
)
pub fn set_tessellation_factor_buffer( &self, buffer: &Buffer, offset: UInteger, instance_stride: UInteger, )
Set the tessellation factor buffer.
C++ equivalent: void setTessellationFactorBuffer(const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn set_tessellation_factor_scale(&self, scale: f32)
pub fn set_tessellation_factor_scale(&self, scale: f32)
Set the tessellation factor scale.
C++ equivalent: void setTessellationFactorScale(float)
Sourcepub fn draw_patches(
&self,
number_of_patch_control_points: UInteger,
patch_start: UInteger,
patch_count: UInteger,
patch_index_buffer: Option<&Buffer>,
patch_index_buffer_offset: UInteger,
instance_count: UInteger,
base_instance: UInteger,
)
pub fn draw_patches( &self, number_of_patch_control_points: UInteger, patch_start: UInteger, patch_count: UInteger, patch_index_buffer: Option<&Buffer>, patch_index_buffer_offset: UInteger, instance_count: UInteger, base_instance: UInteger, )
Draw patches.
C++ equivalent: void drawPatches(...)
Sourcepub fn draw_indexed_patches(
&self,
number_of_patch_control_points: UInteger,
patch_start: UInteger,
patch_count: UInteger,
patch_index_buffer: Option<&Buffer>,
patch_index_buffer_offset: UInteger,
control_point_index_buffer: &Buffer,
control_point_index_buffer_offset: UInteger,
instance_count: UInteger,
base_instance: UInteger,
)
pub fn draw_indexed_patches( &self, number_of_patch_control_points: UInteger, patch_start: UInteger, patch_count: UInteger, patch_index_buffer: Option<&Buffer>, patch_index_buffer_offset: UInteger, control_point_index_buffer: &Buffer, control_point_index_buffer_offset: UInteger, instance_count: UInteger, base_instance: UInteger, )
Draw indexed patches.
C++ equivalent: void drawIndexedPatches(...)
Sourcepub fn draw_indexed_patches_indirect(
&self,
number_of_patch_control_points: UInteger,
patch_index_buffer: Option<&Buffer>,
patch_index_buffer_offset: UInteger,
control_point_index_buffer: &Buffer,
control_point_index_buffer_offset: UInteger,
indirect_buffer: &Buffer,
indirect_buffer_offset: UInteger,
)
pub fn draw_indexed_patches_indirect( &self, number_of_patch_control_points: UInteger, patch_index_buffer: Option<&Buffer>, patch_index_buffer_offset: UInteger, control_point_index_buffer: &Buffer, control_point_index_buffer_offset: UInteger, indirect_buffer: &Buffer, indirect_buffer_offset: UInteger, )
Draw indexed patches with indirect buffer.
C++ equivalent: void drawIndexedPatches(...indirectBuffer...)
Sourcepub fn draw_patches_indirect(
&self,
number_of_patch_control_points: UInteger,
patch_index_buffer: Option<&Buffer>,
patch_index_buffer_offset: UInteger,
indirect_buffer: &Buffer,
indirect_buffer_offset: UInteger,
)
pub fn draw_patches_indirect( &self, number_of_patch_control_points: UInteger, patch_index_buffer: Option<&Buffer>, patch_index_buffer_offset: UInteger, indirect_buffer: &Buffer, indirect_buffer_offset: UInteger, )
Draw patches with indirect buffer.
C++ equivalent: void drawPatches(...indirectBuffer...)
Sourcepub fn draw_mesh_threadgroups(
&self,
threadgroups_per_grid: Size,
threads_per_object_threadgroup: Size,
threads_per_mesh_threadgroup: Size,
)
pub fn draw_mesh_threadgroups( &self, threadgroups_per_grid: Size, threads_per_object_threadgroup: Size, threads_per_mesh_threadgroup: Size, )
Draw mesh threadgroups.
C++ equivalent: void drawMeshThreadgroups(MTL::Size, MTL::Size, MTL::Size)
Sourcepub fn draw_mesh_threads(
&self,
threads_per_grid: Size,
threads_per_object_threadgroup: Size,
threads_per_mesh_threadgroup: Size,
)
pub fn draw_mesh_threads( &self, threads_per_grid: Size, threads_per_object_threadgroup: Size, threads_per_mesh_threadgroup: Size, )
Draw mesh threads.
C++ equivalent: void drawMeshThreads(MTL::Size, MTL::Size, MTL::Size)
Sourcepub fn draw_mesh_threadgroups_indirect(
&self,
indirect_buffer: &Buffer,
indirect_buffer_offset: UInteger,
threads_per_object_threadgroup: Size,
threads_per_mesh_threadgroup: Size,
)
pub fn draw_mesh_threadgroups_indirect( &self, indirect_buffer: &Buffer, indirect_buffer_offset: UInteger, threads_per_object_threadgroup: Size, threads_per_mesh_threadgroup: Size, )
Draw mesh threadgroups with indirect buffer.
C++ equivalent: void drawMeshThreadgroups(const Buffer*, NS::UInteger, MTL::Size, MTL::Size)
Sourcepub fn dispatch_threads_per_tile(&self, threads_per_tile: Size)
pub fn dispatch_threads_per_tile(&self, threads_per_tile: Size)
Dispatch threads per tile.
C++ equivalent: void dispatchThreadsPerTile(MTL::Size)
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn set_object_buffer(
&self,
buffer: &Buffer,
offset: UInteger,
index: UInteger,
)
pub fn set_object_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )
Set an object buffer.
C++ equivalent: void setObjectBuffer(const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn set_object_texture(&self, texture: &Texture, index: UInteger)
pub fn set_object_texture(&self, texture: &Texture, index: UInteger)
Set an object texture.
C++ equivalent: void setObjectTexture(const Texture*, NS::UInteger)
Sourcepub fn set_object_sampler_state(&self, sampler: &SamplerState, index: UInteger)
pub fn set_object_sampler_state(&self, sampler: &SamplerState, index: UInteger)
Set an object sampler state.
C++ equivalent: void setObjectSamplerState(const SamplerState*, NS::UInteger)
Sourcepub fn set_object_threadgroup_memory_length(
&self,
length: UInteger,
index: UInteger,
)
pub fn set_object_threadgroup_memory_length( &self, length: UInteger, index: UInteger, )
Set the object threadgroup memory length.
C++ equivalent: void setObjectThreadgroupMemoryLength(NS::UInteger, NS::UInteger)
Sourcepub fn set_object_buffer_offset(&self, offset: UInteger, index: UInteger)
pub fn set_object_buffer_offset(&self, offset: UInteger, index: UInteger)
Set the object buffer offset.
C++ equivalent: void setObjectBufferOffset(NS::UInteger, NS::UInteger)
Sourcepub fn set_object_bytes(&self, bytes: &[u8], index: UInteger)
pub fn set_object_bytes(&self, bytes: &[u8], index: UInteger)
Set inline object bytes.
C++ equivalent: void setObjectBytes(const void*, NS::UInteger, NS::UInteger)
Sourcepub unsafe fn set_object_buffers_ptr(
&self,
buffers: *const *const c_void,
offsets: *const UInteger,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_object_buffers_ptr( &self, buffers: *const *const c_void, offsets: *const UInteger, range_location: UInteger, range_length: UInteger, )
Set multiple object buffers at a range of indices (raw pointer version).
C++ equivalent: void setObjectBuffers(const Buffer* const*, const NS::UInteger*, NS::Range)
§Safety
The buffers and offsets pointers must be valid arrays with at least range.length elements.
Sourcepub unsafe fn set_object_textures_ptr(
&self,
textures: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_object_textures_ptr( &self, textures: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple object textures at a range of indices (raw pointer version).
C++ equivalent: void setObjectTextures(const Texture* const*, NS::Range)
§Safety
The textures pointer must be a valid array with at least range.length elements.
Sourcepub fn set_object_sampler_state_with_lod_clamps(
&self,
sampler: &SamplerState,
lod_min_clamp: f32,
lod_max_clamp: f32,
index: UInteger,
)
pub fn set_object_sampler_state_with_lod_clamps( &self, sampler: &SamplerState, lod_min_clamp: f32, lod_max_clamp: f32, index: UInteger, )
Set an object sampler state with LOD clamps.
C++ equivalent: void setObjectSamplerState(const SamplerState*, float, float, NS::UInteger)
Sourcepub unsafe fn set_object_sampler_states_ptr(
&self,
samplers: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_object_sampler_states_ptr( &self, samplers: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple object sampler states at a range of indices (raw pointer version).
C++ equivalent: void setObjectSamplerStates(const SamplerState* const*, NS::Range)
§Safety
The samplers pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_object_sampler_states_with_lod_clamps_ptr(
&self,
samplers: *const *const c_void,
lod_min_clamps: *const f32,
lod_max_clamps: *const f32,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_object_sampler_states_with_lod_clamps_ptr( &self, samplers: *const *const c_void, lod_min_clamps: *const f32, lod_max_clamps: *const f32, range_location: UInteger, range_length: UInteger, )
Set multiple object sampler states with LOD clamps at a range of indices (raw pointer version).
C++ equivalent: void setObjectSamplerStates(const SamplerState* const*, const float*, const float*, NS::Range)
§Safety
The samplers, lod_min_clamps, and lod_max_clamps pointers must be valid arrays with at least range.length elements.
Sourcepub fn set_mesh_buffer(
&self,
buffer: &Buffer,
offset: UInteger,
index: UInteger,
)
pub fn set_mesh_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )
Set a mesh buffer.
C++ equivalent: void setMeshBuffer(const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn set_mesh_texture(&self, texture: &Texture, index: UInteger)
pub fn set_mesh_texture(&self, texture: &Texture, index: UInteger)
Set a mesh texture.
C++ equivalent: void setMeshTexture(const Texture*, NS::UInteger)
Sourcepub fn set_mesh_sampler_state(&self, sampler: &SamplerState, index: UInteger)
pub fn set_mesh_sampler_state(&self, sampler: &SamplerState, index: UInteger)
Set a mesh sampler state.
C++ equivalent: void setMeshSamplerState(const SamplerState*, NS::UInteger)
Sourcepub fn set_mesh_buffer_offset(&self, offset: UInteger, index: UInteger)
pub fn set_mesh_buffer_offset(&self, offset: UInteger, index: UInteger)
Set the mesh buffer offset.
C++ equivalent: void setMeshBufferOffset(NS::UInteger, NS::UInteger)
Sourcepub fn set_mesh_bytes(&self, bytes: &[u8], index: UInteger)
pub fn set_mesh_bytes(&self, bytes: &[u8], index: UInteger)
Set inline mesh bytes.
C++ equivalent: void setMeshBytes(const void*, NS::UInteger, NS::UInteger)
Sourcepub unsafe fn set_mesh_buffers_ptr(
&self,
buffers: *const *const c_void,
offsets: *const UInteger,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_mesh_buffers_ptr( &self, buffers: *const *const c_void, offsets: *const UInteger, range_location: UInteger, range_length: UInteger, )
Set multiple mesh buffers at a range of indices (raw pointer version).
C++ equivalent: void setMeshBuffers(const Buffer* const*, const NS::UInteger*, NS::Range)
§Safety
The buffers and offsets pointers must be valid arrays with at least range.length elements.
Sourcepub unsafe fn set_mesh_textures_ptr(
&self,
textures: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_mesh_textures_ptr( &self, textures: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple mesh textures at a range of indices (raw pointer version).
C++ equivalent: void setMeshTextures(const Texture* const*, NS::Range)
§Safety
The textures pointer must be a valid array with at least range.length elements.
Sourcepub fn set_mesh_sampler_state_with_lod_clamps(
&self,
sampler: &SamplerState,
lod_min_clamp: f32,
lod_max_clamp: f32,
index: UInteger,
)
pub fn set_mesh_sampler_state_with_lod_clamps( &self, sampler: &SamplerState, lod_min_clamp: f32, lod_max_clamp: f32, index: UInteger, )
Set a mesh sampler state with LOD clamps.
C++ equivalent: void setMeshSamplerState(const SamplerState*, float, float, NS::UInteger)
Sourcepub unsafe fn set_mesh_sampler_states_ptr(
&self,
samplers: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_mesh_sampler_states_ptr( &self, samplers: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple mesh sampler states at a range of indices (raw pointer version).
C++ equivalent: void setMeshSamplerStates(const SamplerState* const*, NS::Range)
§Safety
The samplers pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_mesh_sampler_states_with_lod_clamps_ptr(
&self,
samplers: *const *const c_void,
lod_min_clamps: *const f32,
lod_max_clamps: *const f32,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_mesh_sampler_states_with_lod_clamps_ptr( &self, samplers: *const *const c_void, lod_min_clamps: *const f32, lod_max_clamps: *const f32, range_location: UInteger, range_length: UInteger, )
Set multiple mesh sampler states with LOD clamps at a range of indices (raw pointer version).
C++ equivalent: void setMeshSamplerStates(const SamplerState* const*, const float*, const float*, NS::Range)
§Safety
The samplers, lod_min_clamps, and lod_max_clamps pointers must be valid arrays with at least range.length elements.
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn set_cull_mode(&self, cull_mode: CullMode)
pub fn set_cull_mode(&self, cull_mode: CullMode)
Set the cull mode.
C++ equivalent: void setCullMode(MTL::CullMode)
Sourcepub fn set_front_facing_winding(&self, winding: Winding)
pub fn set_front_facing_winding(&self, winding: Winding)
Set the front-facing winding order.
C++ equivalent: void setFrontFacingWinding(MTL::Winding)
Sourcepub fn set_triangle_fill_mode(&self, fill_mode: TriangleFillMode)
pub fn set_triangle_fill_mode(&self, fill_mode: TriangleFillMode)
Set the triangle fill mode.
C++ equivalent: void setTriangleFillMode(MTL::TriangleFillMode)
Sourcepub fn set_depth_clip_mode(&self, mode: DepthClipMode)
pub fn set_depth_clip_mode(&self, mode: DepthClipMode)
Set the depth clip mode.
C++ equivalent: void setDepthClipMode(MTL::DepthClipMode)
Sourcepub fn set_depth_bias(&self, depth_bias: f32, slope_scale: f32, clamp: f32)
pub fn set_depth_bias(&self, depth_bias: f32, slope_scale: f32, clamp: f32)
Set the depth bias.
C++ equivalent: void setDepthBias(float, float, float)
Sourcepub fn set_depth_test_bounds(&self, min_bound: f32, max_bound: f32)
pub fn set_depth_test_bounds(&self, min_bound: f32, max_bound: f32)
Set the depth test bounds.
C++ equivalent: void setDepthTestBounds(float, float)
Sourcepub fn set_depth_stencil_state(&self, state: &DepthStencilState)
pub fn set_depth_stencil_state(&self, state: &DepthStencilState)
Set the depth stencil state.
C++ equivalent: void setDepthStencilState(const DepthStencilState*)
Sourcepub fn set_stencil_reference_value(&self, value: u32)
pub fn set_stencil_reference_value(&self, value: u32)
Set the stencil reference value (same for front and back).
C++ equivalent: void setStencilReferenceValue(uint32_t)
Sourcepub fn set_stencil_reference_values(&self, front: u32, back: u32)
pub fn set_stencil_reference_values(&self, front: u32, back: u32)
Set the stencil reference values (separate front and back).
C++ equivalent: void setStencilReferenceValues(uint32_t, uint32_t)
Sourcepub fn set_blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
pub fn set_blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
Set the blend color.
C++ equivalent: void setBlendColor(float, float, float, float)
Sourcepub fn set_visibility_result_mode(
&self,
mode: VisibilityResultMode,
offset: UInteger,
)
pub fn set_visibility_result_mode( &self, mode: VisibilityResultMode, offset: UInteger, )
Set the visibility result mode.
C++ equivalent: void setVisibilityResultMode(MTL::VisibilityResultMode, NS::UInteger)
Sourcepub fn set_color_store_action(
&self,
store_action: StoreAction,
attachment_index: UInteger,
)
pub fn set_color_store_action( &self, store_action: StoreAction, attachment_index: UInteger, )
Set the color store action for an attachment.
C++ equivalent: void setColorStoreAction(MTL::StoreAction, NS::UInteger)
Sourcepub fn set_color_store_action_options(
&self,
options: StoreActionOptions,
attachment_index: UInteger,
)
pub fn set_color_store_action_options( &self, options: StoreActionOptions, attachment_index: UInteger, )
Set the color store action options for an attachment.
C++ equivalent: void setColorStoreActionOptions(MTL::StoreActionOptions, NS::UInteger)
Sourcepub fn set_depth_store_action(&self, store_action: StoreAction)
pub fn set_depth_store_action(&self, store_action: StoreAction)
Set the depth store action.
C++ equivalent: void setDepthStoreAction(MTL::StoreAction)
Sourcepub fn set_depth_store_action_options(&self, options: StoreActionOptions)
pub fn set_depth_store_action_options(&self, options: StoreActionOptions)
Set the depth store action options.
C++ equivalent: void setDepthStoreActionOptions(MTL::StoreActionOptions)
Sourcepub fn set_stencil_store_action(&self, store_action: StoreAction)
pub fn set_stencil_store_action(&self, store_action: StoreAction)
Set the stencil store action.
C++ equivalent: void setStencilStoreAction(MTL::StoreAction)
Sourcepub fn set_stencil_store_action_options(&self, options: StoreActionOptions)
pub fn set_stencil_store_action_options(&self, options: StoreActionOptions)
Set the stencil store action options.
C++ equivalent: void setStencilStoreActionOptions(MTL::StoreActionOptions)
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn set_tile_buffer(
&self,
buffer: &Buffer,
offset: UInteger,
index: UInteger,
)
pub fn set_tile_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )
Set a tile buffer.
C++ equivalent: void setTileBuffer(const Buffer*, NS::UInteger, NS::UInteger)
Sourcepub fn set_tile_texture(&self, texture: &Texture, index: UInteger)
pub fn set_tile_texture(&self, texture: &Texture, index: UInteger)
Set a tile texture.
C++ equivalent: void setTileTexture(const Texture*, NS::UInteger)
Sourcepub fn set_tile_sampler_state(&self, sampler: &SamplerState, index: UInteger)
pub fn set_tile_sampler_state(&self, sampler: &SamplerState, index: UInteger)
Set a tile sampler state.
C++ equivalent: void setTileSamplerState(const SamplerState*, NS::UInteger)
Sourcepub fn set_tile_bytes(&self, bytes: &[u8], index: UInteger)
pub fn set_tile_bytes(&self, bytes: &[u8], index: UInteger)
Set inline tile bytes.
C++ equivalent: void setTileBytes(const void*, NS::UInteger, NS::UInteger)
Sourcepub fn set_tile_buffer_offset(&self, offset: UInteger, index: UInteger)
pub fn set_tile_buffer_offset(&self, offset: UInteger, index: UInteger)
Set the tile buffer offset.
C++ equivalent: void setTileBufferOffset(NS::UInteger, NS::UInteger)
Sourcepub unsafe fn set_tile_buffers_ptr(
&self,
buffers: *const *const c_void,
offsets: *const UInteger,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_tile_buffers_ptr( &self, buffers: *const *const c_void, offsets: *const UInteger, range_location: UInteger, range_length: UInteger, )
Set multiple tile buffers at a range of indices (raw pointer version).
C++ equivalent: void setTileBuffers(const Buffer* const*, const NS::UInteger*, NS::Range)
§Safety
The buffers and offsets pointers must be valid arrays with at least range.length elements.
Sourcepub unsafe fn set_tile_textures_ptr(
&self,
textures: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_tile_textures_ptr( &self, textures: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple tile textures at a range of indices (raw pointer version).
C++ equivalent: void setTileTextures(const Texture* const*, NS::Range)
§Safety
The textures pointer must be a valid array with at least range.length elements.
Sourcepub fn set_tile_sampler_state_with_lod_clamps(
&self,
sampler: &SamplerState,
lod_min_clamp: f32,
lod_max_clamp: f32,
index: UInteger,
)
pub fn set_tile_sampler_state_with_lod_clamps( &self, sampler: &SamplerState, lod_min_clamp: f32, lod_max_clamp: f32, index: UInteger, )
Set a tile sampler state with LOD clamps.
C++ equivalent: void setTileSamplerState(const SamplerState*, float, float, NS::UInteger)
Sourcepub unsafe fn set_tile_sampler_states_ptr(
&self,
samplers: *const *const c_void,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_tile_sampler_states_ptr( &self, samplers: *const *const c_void, range_location: UInteger, range_length: UInteger, )
Set multiple tile sampler states at a range of indices (raw pointer version).
C++ equivalent: void setTileSamplerStates(const SamplerState* const*, NS::Range)
§Safety
The samplers pointer must be a valid array with at least range.length elements.
Sourcepub unsafe fn set_tile_sampler_states_with_lod_clamps_ptr(
&self,
samplers: *const *const c_void,
lod_min_clamps: *const f32,
lod_max_clamps: *const f32,
range_location: UInteger,
range_length: UInteger,
)
pub unsafe fn set_tile_sampler_states_with_lod_clamps_ptr( &self, samplers: *const *const c_void, lod_min_clamps: *const f32, lod_max_clamps: *const f32, range_location: UInteger, range_length: UInteger, )
Set multiple tile sampler states with LOD clamps at a range of indices (raw pointer version).
C++ equivalent: void setTileSamplerStates(const SamplerState* const*, const float*, const float*, NS::Range)
§Safety
The samplers, lod_min_clamps, and lod_max_clamps pointers must be valid arrays with at least range.length elements.
Sourcepub fn tile_width(&self) -> UInteger
pub fn tile_width(&self) -> UInteger
Get the tile width.
C++ equivalent: NS::UInteger tileWidth() const
Sourcepub fn tile_height(&self) -> UInteger
pub fn tile_height(&self) -> UInteger
Get the tile height.
C++ equivalent: NS::UInteger tileHeight() const
Sourcepub fn set_threadgroup_memory_length(
&self,
length: UInteger,
offset: UInteger,
index: UInteger,
)
pub fn set_threadgroup_memory_length( &self, length: UInteger, offset: UInteger, index: UInteger, )
Set the threadgroup memory length at an index with offset.
C++ equivalent: void setThreadgroupMemoryLength(NS::UInteger, NS::UInteger, NS::UInteger)
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub fn set_viewport(&self, viewport: Viewport)
pub fn set_viewport(&self, viewport: Viewport)
Set the viewport.
C++ equivalent: void setViewport(MTL::Viewport)
Sourcepub fn set_viewports(&self, viewports: &[Viewport])
pub fn set_viewports(&self, viewports: &[Viewport])
Set multiple viewports.
C++ equivalent: void setViewports(const Viewport*, NS::UInteger)
Sourcepub fn set_scissor_rect(&self, rect: ScissorRect)
pub fn set_scissor_rect(&self, rect: ScissorRect)
Set the scissor rectangle.
C++ equivalent: void setScissorRect(MTL::ScissorRect)
Sourcepub fn set_scissor_rects(&self, rects: &[ScissorRect])
pub fn set_scissor_rects(&self, rects: &[ScissorRect])
Set multiple scissor rectangles.
C++ equivalent: void setScissorRects(const ScissorRect*, NS::UInteger)
Source§impl RenderCommandEncoder
impl RenderCommandEncoder
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a RenderCommandEncoder from a raw pointer.
§Safety
The pointer must be a valid Metal render command encoder object.
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this encoder.
C++ equivalent: Device* device() const
Sourcepub fn command_buffer(&self) -> CommandBuffer
pub fn command_buffer(&self) -> CommandBuffer
Get the command buffer that this encoder is encoding into.
C++ equivalent: CommandBuffer* commandBuffer() const
Sourcepub fn label(&self) -> Option<String>
pub fn label(&self) -> Option<String>
Get the label for this encoder.
C++ equivalent: NS::String* label() const
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label for this encoder.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn end_encoding(&self)
pub fn end_encoding(&self)
End encoding commands with this encoder.
C++ equivalent: void endEncoding()
Sourcepub fn insert_debug_signpost(&self, string: &str)
pub fn insert_debug_signpost(&self, string: &str)
Insert a debug signpost.
C++ equivalent: void insertDebugSignpost(const NS::String*)
Sourcepub fn push_debug_group(&self, string: &str)
pub fn push_debug_group(&self, string: &str)
Push a debug group.
C++ equivalent: void pushDebugGroup(const NS::String*)
Sourcepub fn pop_debug_group(&self)
pub fn pop_debug_group(&self)
Pop the current debug group.
C++ equivalent: void popDebugGroup()
Sourcepub fn barrier_after_queue_stages(
&self,
after_stages: Stages,
before_stages: Stages,
)
pub fn barrier_after_queue_stages( &self, after_stages: Stages, before_stages: Stages, )
Insert a barrier to synchronize queue stages.
C++ equivalent: void barrierAfterQueueStages(Stages, Stages)
Sourcepub fn set_render_pipeline_state(&self, state: &RenderPipelineState)
pub fn set_render_pipeline_state(&self, state: &RenderPipelineState)
Set the render pipeline state.
C++ equivalent: void setRenderPipelineState(const RenderPipelineState*)