pub struct RenderPipelineColorAttachmentDescriptor(/* private fields */);Expand description
Describes the color attachment for a render pipeline.
C++ equivalent: MTL::RenderPipelineColorAttachmentDescriptor
Implementations§
Source§impl RenderPipelineColorAttachmentDescriptor
impl RenderPipelineColorAttachmentDescriptor
Sourcepub fn alloc() -> Option<Self>
pub fn alloc() -> Option<Self>
Allocate a new color attachment descriptor.
C++ equivalent: static RenderPipelineColorAttachmentDescriptor* alloc()
Sourcepub fn init(self) -> Option<Self>
pub fn init(self) -> Option<Self>
Initialize the descriptor.
C++ equivalent: RenderPipelineColorAttachmentDescriptor* init()
Sourcepub fn pixel_format(&self) -> PixelFormat
pub fn pixel_format(&self) -> PixelFormat
Get the pixel format.
C++ equivalent: PixelFormat pixelFormat() const
Sourcepub fn set_pixel_format(&self, format: PixelFormat)
pub fn set_pixel_format(&self, format: PixelFormat)
Set the pixel format.
C++ equivalent: void setPixelFormat(MTL::PixelFormat pixelFormat)
Sourcepub fn is_blending_enabled(&self) -> bool
pub fn is_blending_enabled(&self) -> bool
Check if blending is enabled.
C++ equivalent: bool isBlendingEnabled() const
Sourcepub fn set_blending_enabled(&self, enabled: bool)
pub fn set_blending_enabled(&self, enabled: bool)
Set blending enabled.
C++ equivalent: void setBlendingEnabled(bool blendingEnabled)
Sourcepub fn source_rgb_blend_factor(&self) -> BlendFactor
pub fn source_rgb_blend_factor(&self) -> BlendFactor
Get the source RGB blend factor.
C++ equivalent: BlendFactor sourceRGBBlendFactor() const
Sourcepub fn set_source_rgb_blend_factor(&self, factor: BlendFactor)
pub fn set_source_rgb_blend_factor(&self, factor: BlendFactor)
Set the source RGB blend factor.
C++ equivalent: void setSourceRGBBlendFactor(MTL::BlendFactor sourceRGBBlendFactor)
Sourcepub fn destination_rgb_blend_factor(&self) -> BlendFactor
pub fn destination_rgb_blend_factor(&self) -> BlendFactor
Get the destination RGB blend factor.
C++ equivalent: BlendFactor destinationRGBBlendFactor() const
Sourcepub fn set_destination_rgb_blend_factor(&self, factor: BlendFactor)
pub fn set_destination_rgb_blend_factor(&self, factor: BlendFactor)
Set the destination RGB blend factor.
C++ equivalent: void setDestinationRGBBlendFactor(MTL::BlendFactor destinationRGBBlendFactor)
Sourcepub fn rgb_blend_operation(&self) -> BlendOperation
pub fn rgb_blend_operation(&self) -> BlendOperation
Get the RGB blend operation.
C++ equivalent: BlendOperation rgbBlendOperation() const
Sourcepub fn set_rgb_blend_operation(&self, operation: BlendOperation)
pub fn set_rgb_blend_operation(&self, operation: BlendOperation)
Set the RGB blend operation.
C++ equivalent: void setRgbBlendOperation(MTL::BlendOperation rgbBlendOperation)
Sourcepub fn source_alpha_blend_factor(&self) -> BlendFactor
pub fn source_alpha_blend_factor(&self) -> BlendFactor
Get the source alpha blend factor.
C++ equivalent: BlendFactor sourceAlphaBlendFactor() const
Sourcepub fn set_source_alpha_blend_factor(&self, factor: BlendFactor)
pub fn set_source_alpha_blend_factor(&self, factor: BlendFactor)
Set the source alpha blend factor.
C++ equivalent: void setSourceAlphaBlendFactor(MTL::BlendFactor sourceAlphaBlendFactor)
Sourcepub fn destination_alpha_blend_factor(&self) -> BlendFactor
pub fn destination_alpha_blend_factor(&self) -> BlendFactor
Get the destination alpha blend factor.
C++ equivalent: BlendFactor destinationAlphaBlendFactor() const
Sourcepub fn set_destination_alpha_blend_factor(&self, factor: BlendFactor)
pub fn set_destination_alpha_blend_factor(&self, factor: BlendFactor)
Set the destination alpha blend factor.
C++ equivalent: void setDestinationAlphaBlendFactor(MTL::BlendFactor destinationAlphaBlendFactor)
Sourcepub fn alpha_blend_operation(&self) -> BlendOperation
pub fn alpha_blend_operation(&self) -> BlendOperation
Get the alpha blend operation.
C++ equivalent: BlendOperation alphaBlendOperation() const
Sourcepub fn set_alpha_blend_operation(&self, operation: BlendOperation)
pub fn set_alpha_blend_operation(&self, operation: BlendOperation)
Set the alpha blend operation.
C++ equivalent: void setAlphaBlendOperation(MTL::BlendOperation alphaBlendOperation)
Sourcepub fn write_mask(&self) -> ColorWriteMask
pub fn write_mask(&self) -> ColorWriteMask
Get the color write mask.
C++ equivalent: ColorWriteMask writeMask() const
Sourcepub fn set_write_mask(&self, mask: ColorWriteMask)
pub fn set_write_mask(&self, mask: ColorWriteMask)
Set the color write mask.
C++ equivalent: void setWriteMask(MTL::ColorWriteMask writeMask)