MetalRenderPipelineDescriptor

Struct MetalRenderPipelineDescriptor 

Source
pub struct MetalRenderPipelineDescriptor { /* private fields */ }
Expand description

A render pipeline descriptor

Implementations§

Source§

impl MetalRenderPipelineDescriptor

Source

pub fn new() -> Self

Create a new render pipeline descriptor

§Panics

Panics if descriptor creation fails (should not happen).

Source

pub fn set_vertex_function(&self, function: &MetalFunction)

Set the vertex function

Source

pub fn set_fragment_function(&self, function: &MetalFunction)

Set the fragment function

Source

pub fn set_vertex_descriptor(&self, descriptor: &MetalVertexDescriptor)

Set the vertex descriptor for vertex buffer layout

Source

pub fn set_color_attachment_pixel_format( &self, index: usize, format: MTLPixelFormat, )

Set color attachment pixel format

Source

pub fn set_blending_enabled(&self, index: usize, enabled: bool)

Set blending enabled for a color attachment

Source

pub fn set_blend_operations( &self, index: usize, rgb_op: MTLBlendOperation, alpha_op: MTLBlendOperation, )

Set blend operations

Source

pub fn set_blend_factors( &self, index: usize, src_rgb: MTLBlendFactor, dst_rgb: MTLBlendFactor, src_alpha: MTLBlendFactor, dst_alpha: MTLBlendFactor, )

Set blend factors

Source

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

Get the raw pointer

Trait Implementations§

Source§

impl Debug for MetalRenderPipelineDescriptor

Source§

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

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

impl Default for MetalRenderPipelineDescriptor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for MetalRenderPipelineDescriptor

Source§

fn drop(&mut self)

Executes the destructor for this type. 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.