pub struct MetalRenderPipelineDescriptor { /* private fields */ }Expand description
A render pipeline descriptor
Implementations§
Source§impl MetalRenderPipelineDescriptor
impl MetalRenderPipelineDescriptor
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new render pipeline descriptor
§Panics
Panics if descriptor creation fails (should not happen).
Sourcepub fn set_vertex_function(&self, function: &MetalFunction)
pub fn set_vertex_function(&self, function: &MetalFunction)
Set the vertex function
Sourcepub fn set_fragment_function(&self, function: &MetalFunction)
pub fn set_fragment_function(&self, function: &MetalFunction)
Set the fragment function
Sourcepub fn set_vertex_descriptor(&self, descriptor: &MetalVertexDescriptor)
pub fn set_vertex_descriptor(&self, descriptor: &MetalVertexDescriptor)
Set the vertex descriptor for vertex buffer layout
Sourcepub fn set_color_attachment_pixel_format(
&self,
index: usize,
format: MTLPixelFormat,
)
pub fn set_color_attachment_pixel_format( &self, index: usize, format: MTLPixelFormat, )
Set color attachment pixel format
Sourcepub fn set_blending_enabled(&self, index: usize, enabled: bool)
pub fn set_blending_enabled(&self, index: usize, enabled: bool)
Set blending enabled for a color attachment
Sourcepub fn set_blend_operations(
&self,
index: usize,
rgb_op: MTLBlendOperation,
alpha_op: MTLBlendOperation,
)
pub fn set_blend_operations( &self, index: usize, rgb_op: MTLBlendOperation, alpha_op: MTLBlendOperation, )
Set blend operations
Sourcepub fn set_blend_factors(
&self,
index: usize,
src_rgb: MTLBlendFactor,
dst_rgb: MTLBlendFactor,
src_alpha: MTLBlendFactor,
dst_alpha: MTLBlendFactor,
)
pub fn set_blend_factors( &self, index: usize, src_rgb: MTLBlendFactor, dst_rgb: MTLBlendFactor, src_alpha: MTLBlendFactor, dst_alpha: MTLBlendFactor, )
Set blend factors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetalRenderPipelineDescriptor
impl RefUnwindSafe for MetalRenderPipelineDescriptor
impl !Send for MetalRenderPipelineDescriptor
impl !Sync for MetalRenderPipelineDescriptor
impl Unpin for MetalRenderPipelineDescriptor
impl UnwindSafe for MetalRenderPipelineDescriptor
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