Skip to main content

IndirectRenderCommand

Struct IndirectRenderCommand 

Source
pub struct IndirectRenderCommand(/* private fields */);
Expand description

A render command within an indirect command buffer.

C++ equivalent: MTL::IndirectRenderCommand

Indirect render commands can encode draw calls and state changes that will be executed when the indirect command buffer is executed.

Implementations§

Source§

impl IndirectRenderCommand

Source

pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>

Create from a raw pointer.

§Safety

The pointer must be a valid Metal indirect render command.

Source

pub fn as_raw(&self) -> *mut c_void

Get the raw pointer.

Source

pub fn reset(&self)

Reset this command.

C++ equivalent: void reset()

Source

pub fn set_barrier(&self)

Set a barrier for this command.

C++ equivalent: void setBarrier()

Source

pub fn clear_barrier(&self)

Clear a barrier for this command.

C++ equivalent: void clearBarrier()

Source

pub fn set_render_pipeline_state(&self, state: &RenderPipelineState)

Set the render pipeline state.

C++ equivalent: void setRenderPipelineState(const RenderPipelineState*)

Source

pub fn set_vertex_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )

Set a vertex buffer.

C++ equivalent: void setVertexBuffer(const Buffer*, NS::UInteger offset, NS::UInteger index)

Source

pub fn set_vertex_buffer_with_stride( &self, buffer: &Buffer, offset: UInteger, stride: UInteger, index: UInteger, )

Set a vertex buffer with stride.

C++ equivalent: void setVertexBuffer(const Buffer*, NS::UInteger offset, NS::UInteger stride, NS::UInteger index)

Source

pub fn set_fragment_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )

Set a fragment buffer.

C++ equivalent: void setFragmentBuffer(const Buffer*, NS::UInteger offset, NS::UInteger index)

Source

pub fn set_mesh_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )

Set a mesh buffer.

C++ equivalent: void setMeshBuffer(const Buffer*, NS::UInteger offset, NS::UInteger index)

Source

pub fn set_object_buffer( &self, buffer: &Buffer, offset: UInteger, index: UInteger, )

Set an object buffer.

C++ equivalent: void setObjectBuffer(const Buffer*, NS::UInteger offset, NS::UInteger index)

Source

pub fn set_object_threadgroup_memory_length( &self, length: UInteger, index: UInteger, )

Set object threadgroup memory length.

C++ equivalent: void setObjectThreadgroupMemoryLength(NS::UInteger, NS::UInteger)

Source

pub fn set_cull_mode(&self, mode: CullMode)

Set the cull mode.

C++ equivalent: void setCullMode(CullMode)

Source

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)

Source

pub fn set_depth_clip_mode(&self, mode: DepthClipMode)

Set the depth clip mode.

C++ equivalent: void setDepthClipMode(DepthClipMode)

Source

pub fn set_depth_stencil_state(&self, state: &DepthStencilState)

Set the depth stencil state.

C++ equivalent: void setDepthStencilState(const DepthStencilState*)

Source

pub fn set_front_facing_winding(&self, winding: Winding)

Set the front facing winding.

C++ equivalent: void setFrontFacingWinding(Winding)

Source

pub fn set_triangle_fill_mode(&self, mode: TriangleFillMode)

Set the triangle fill mode.

C++ equivalent: void setTriangleFillMode(TriangleFillMode)

Source

pub fn draw_primitives( &self, primitive_type: PrimitiveType, vertex_start: UInteger, vertex_count: UInteger, instance_count: UInteger, base_instance: UInteger, )

Draw primitives.

C++ equivalent: void drawPrimitives(...)

Source

pub fn draw_indexed_primitives( &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.

C++ equivalent: void drawIndexedPrimitives(...)

Source

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(...)

Source

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(...)

Trait Implementations§

Source§

impl Debug for IndirectRenderCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Referencing for IndirectRenderCommand

Source§

fn as_ptr(&self) -> *const c_void

Get the raw pointer to the Objective-C object.
Source§

fn as_mut_ptr(&self) -> *mut c_void

Get the raw mutable pointer to the Objective-C object.
Source§

fn release(&self)

Release the object, decrementing its reference count. Read more
Source§

fn retain_count(&self) -> usize

Get the retain count of the object. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.