pub struct MetalRenderCommandEncoder { /* private fields */ }Expand description
A render command encoder
Dropping the final retained handle ends encoding automatically so the parent command buffer cannot be left permanently uncommittable.
Implementations§
Source§impl MetalRenderCommandEncoder
impl MetalRenderCommandEncoder
Sourcepub fn set_render_pipeline_state(
&self,
pipeline: &MetalRenderPipelineState,
) -> Result<(), MetalError>
pub fn set_render_pipeline_state( &self, pipeline: &MetalRenderPipelineState, ) -> Result<(), MetalError>
Sourcepub fn set_vertex_buffer(
&self,
buffer: &MetalBuffer,
offset: usize,
index: usize,
) -> Result<(), MetalError>
pub fn set_vertex_buffer( &self, buffer: &MetalBuffer, offset: usize, index: usize, ) -> Result<(), MetalError>
Set a vertex buffer
§Errors
Returns an error after encoding has ended or for an invalid offset or buffer binding index.
Sourcepub fn set_fragment_buffer(
&self,
buffer: &MetalBuffer,
offset: usize,
index: usize,
) -> Result<(), MetalError>
pub fn set_fragment_buffer( &self, buffer: &MetalBuffer, offset: usize, index: usize, ) -> Result<(), MetalError>
Set a fragment buffer
§Errors
Returns an error after encoding has ended or for an invalid offset or buffer binding index.
Sourcepub fn set_fragment_texture(
&self,
texture: &MetalTexture,
index: usize,
) -> Result<(), MetalError>
pub fn set_fragment_texture( &self, texture: &MetalTexture, index: usize, ) -> Result<(), MetalError>
Set a fragment texture
§Errors
Returns an error after encoding has ended or for an invalid texture binding index.
Sourcepub fn draw_primitives(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: usize,
vertex_count: usize,
) -> Result<(), MetalError>
pub fn draw_primitives( &self, primitive_type: MTLPrimitiveType, vertex_start: usize, vertex_count: usize, ) -> Result<(), MetalError>
Draw primitives
§Errors
Returns an error after encoding has ended or when the vertex range
cannot be represented by Swift’s Int.
Sourcepub fn end_encoding(&self) -> Result<(), MetalError>
pub fn end_encoding(&self) -> Result<(), MetalError>
End encoding
§Errors
Returns an error if encoding already ended through this handle or one of its retained clones.
Trait Implementations§
Source§impl Clone for MetalRenderCommandEncoder
impl Clone for MetalRenderCommandEncoder
Source§impl Debug for MetalRenderCommandEncoder
impl Debug for MetalRenderCommandEncoder
Source§impl Drop for MetalRenderCommandEncoder
impl Drop for MetalRenderCommandEncoder
Auto Trait Implementations§
impl !Send for MetalRenderCommandEncoder
impl !Sync for MetalRenderCommandEncoder
impl Freeze for MetalRenderCommandEncoder
impl RefUnwindSafe for MetalRenderCommandEncoder
impl Unpin for MetalRenderCommandEncoder
impl UnsafeUnpin for MetalRenderCommandEncoder
impl UnwindSafe for MetalRenderCommandEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more