pub struct RenderPassDescriptor(/* private fields */);Expand description
A render pass descriptor that configures a render pass.
C++ equivalent: MTL::RenderPassDescriptor
Implementations§
Source§impl RenderPassDescriptor
impl RenderPassDescriptor
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a RenderPassDescriptor from a raw pointer.
§Safety
The pointer must be a valid Metal render pass descriptor object.
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new render pass descriptor.
C++ equivalent: RenderPassDescriptor::renderPassDescriptor()
Sourcepub fn color_attachments(
&self,
) -> Option<RenderPassColorAttachmentDescriptorArray>
pub fn color_attachments( &self, ) -> Option<RenderPassColorAttachmentDescriptorArray>
Get the array of color attachment descriptors.
C++ equivalent: RenderPassColorAttachmentDescriptorArray* colorAttachments() const
Sourcepub fn depth_attachment(&self) -> Option<RenderPassDepthAttachmentDescriptor>
pub fn depth_attachment(&self) -> Option<RenderPassDepthAttachmentDescriptor>
Get the depth attachment descriptor.
C++ equivalent: RenderPassDepthAttachmentDescriptor* depthAttachment() const
Sourcepub fn set_depth_attachment(
&self,
attachment: Option<&RenderPassDepthAttachmentDescriptor>,
)
pub fn set_depth_attachment( &self, attachment: Option<&RenderPassDepthAttachmentDescriptor>, )
Set the depth attachment descriptor.
C++ equivalent: void setDepthAttachment(const RenderPassDepthAttachmentDescriptor*)
Sourcepub fn stencil_attachment(
&self,
) -> Option<RenderPassStencilAttachmentDescriptor>
pub fn stencil_attachment( &self, ) -> Option<RenderPassStencilAttachmentDescriptor>
Get the stencil attachment descriptor.
C++ equivalent: RenderPassStencilAttachmentDescriptor* stencilAttachment() const
Sourcepub fn set_stencil_attachment(
&self,
attachment: Option<&RenderPassStencilAttachmentDescriptor>,
)
pub fn set_stencil_attachment( &self, attachment: Option<&RenderPassStencilAttachmentDescriptor>, )
Set the stencil attachment descriptor.
C++ equivalent: void setStencilAttachment(const RenderPassStencilAttachmentDescriptor*)
Sourcepub fn visibility_result_buffer(&self) -> Option<Buffer>
pub fn visibility_result_buffer(&self) -> Option<Buffer>
Get the visibility result buffer.
C++ equivalent: Buffer* visibilityResultBuffer() const
Sourcepub fn set_visibility_result_buffer(&self, buffer: Option<&Buffer>)
pub fn set_visibility_result_buffer(&self, buffer: Option<&Buffer>)
Set the visibility result buffer.
C++ equivalent: void setVisibilityResultBuffer(const Buffer*)
Sourcepub fn visibility_result_type(&self) -> VisibilityResultType
pub fn visibility_result_type(&self) -> VisibilityResultType
Get the visibility result type.
C++ equivalent: VisibilityResultType visibilityResultType() const
Sourcepub fn set_visibility_result_type(&self, result_type: VisibilityResultType)
pub fn set_visibility_result_type(&self, result_type: VisibilityResultType)
Set the visibility result type.
C++ equivalent: void setVisibilityResultType(VisibilityResultType)
Sourcepub fn render_target_width(&self) -> UInteger
pub fn render_target_width(&self) -> UInteger
Get the render target width.
C++ equivalent: NS::UInteger renderTargetWidth() const
Sourcepub fn set_render_target_width(&self, width: UInteger)
pub fn set_render_target_width(&self, width: UInteger)
Set the render target width.
C++ equivalent: void setRenderTargetWidth(NS::UInteger)
Sourcepub fn render_target_height(&self) -> UInteger
pub fn render_target_height(&self) -> UInteger
Get the render target height.
C++ equivalent: NS::UInteger renderTargetHeight() const
Sourcepub fn set_render_target_height(&self, height: UInteger)
pub fn set_render_target_height(&self, height: UInteger)
Set the render target height.
C++ equivalent: void setRenderTargetHeight(NS::UInteger)
Sourcepub fn render_target_array_length(&self) -> UInteger
pub fn render_target_array_length(&self) -> UInteger
Get the render target array length.
C++ equivalent: NS::UInteger renderTargetArrayLength() const
Sourcepub fn set_render_target_array_length(&self, length: UInteger)
pub fn set_render_target_array_length(&self, length: UInteger)
Set the render target array length.
C++ equivalent: void setRenderTargetArrayLength(NS::UInteger)
Sourcepub fn default_raster_sample_count(&self) -> UInteger
pub fn default_raster_sample_count(&self) -> UInteger
Get the default raster sample count.
C++ equivalent: NS::UInteger defaultRasterSampleCount() const
Sourcepub fn set_default_raster_sample_count(&self, count: UInteger)
pub fn set_default_raster_sample_count(&self, count: UInteger)
Set the default raster sample count.
C++ equivalent: void setDefaultRasterSampleCount(NS::UInteger)
Sourcepub fn set_sample_positions(&self, positions: &[SamplePosition])
pub fn set_sample_positions(&self, positions: &[SamplePosition])
Set the sample positions.
C++ equivalent: void setSamplePositions(const SamplePosition*, NS::UInteger)
Sourcepub fn get_sample_positions(&self, positions: &mut [SamplePosition]) -> UInteger
pub fn get_sample_positions(&self, positions: &mut [SamplePosition]) -> UInteger
Get the sample positions.
C++ equivalent: NS::UInteger getSamplePositions(SamplePosition*, NS::UInteger)
Sourcepub fn tile_width(&self) -> UInteger
pub fn tile_width(&self) -> UInteger
Get the tile width.
C++ equivalent: NS::UInteger tileWidth() const
Sourcepub fn set_tile_width(&self, width: UInteger)
pub fn set_tile_width(&self, width: UInteger)
Set the tile width.
C++ equivalent: void setTileWidth(NS::UInteger)
Sourcepub fn tile_height(&self) -> UInteger
pub fn tile_height(&self) -> UInteger
Get the tile height.
C++ equivalent: NS::UInteger tileHeight() const
Sourcepub fn set_tile_height(&self, height: UInteger)
pub fn set_tile_height(&self, height: UInteger)
Set the tile height.
C++ equivalent: void setTileHeight(NS::UInteger)
Sourcepub fn threadgroup_memory_length(&self) -> UInteger
pub fn threadgroup_memory_length(&self) -> UInteger
Get the threadgroup memory length.
C++ equivalent: NS::UInteger threadgroupMemoryLength() const
Sourcepub fn set_threadgroup_memory_length(&self, length: UInteger)
pub fn set_threadgroup_memory_length(&self, length: UInteger)
Set the threadgroup memory length.
C++ equivalent: void setThreadgroupMemoryLength(NS::UInteger)
Sourcepub fn imageblock_sample_length(&self) -> UInteger
pub fn imageblock_sample_length(&self) -> UInteger
Get the imageblock sample length.
C++ equivalent: NS::UInteger imageblockSampleLength() const
Sourcepub fn set_imageblock_sample_length(&self, length: UInteger)
pub fn set_imageblock_sample_length(&self, length: UInteger)
Set the imageblock sample length.
C++ equivalent: void setImageblockSampleLength(NS::UInteger)
Sourcepub fn rasterization_rate_map(&self) -> *mut c_void
pub fn rasterization_rate_map(&self) -> *mut c_void
Get the rasterization rate map.
C++ equivalent: RasterizationRateMap* rasterizationRateMap() const
Returns a raw pointer to the rasterization rate map.
Sourcepub unsafe fn set_rasterization_rate_map(&self, rate_map: *const c_void)
pub unsafe fn set_rasterization_rate_map(&self, rate_map: *const c_void)
Set the rasterization rate map.
C++ equivalent: void setRasterizationRateMap(const RasterizationRateMap*)
§Safety
The rate_map pointer must be valid or null.
Sourcepub fn support_color_attachment_mapping(&self) -> bool
pub fn support_color_attachment_mapping(&self) -> bool
Check if color attachment mapping is supported.
C++ equivalent: bool supportColorAttachmentMapping() const
Sourcepub fn set_support_color_attachment_mapping(&self, support: bool)
pub fn set_support_color_attachment_mapping(&self, support: bool)
Set whether color attachment mapping is supported.
C++ equivalent: void setSupportColorAttachmentMapping(bool)