pub struct RenderPassDescriptor(/* private fields */);Expand description
MTL4 render pass descriptor.
C++ equivalent: MTL4::RenderPassDescriptor
RenderPassDescriptor configures a render pass including color, depth, and stencil attachments, sample positions, and tile dimensions.
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.
Sourcepub fn color_attachments(
&self,
) -> Option<RenderPassColorAttachmentDescriptorArray>
pub fn color_attachments( &self, ) -> Option<RenderPassColorAttachmentDescriptorArray>
Get the color attachments array.
C++ equivalent: MTL::RenderPassColorAttachmentDescriptorArray* colorAttachments() const
Sourcepub fn depth_attachment(&self) -> Option<RenderPassDepthAttachmentDescriptor>
pub fn depth_attachment(&self) -> Option<RenderPassDepthAttachmentDescriptor>
Get the depth attachment.
C++ equivalent: MTL::RenderPassDepthAttachmentDescriptor* depthAttachment() const
Sourcepub fn set_depth_attachment(
&self,
attachment: &RenderPassDepthAttachmentDescriptor,
)
pub fn set_depth_attachment( &self, attachment: &RenderPassDepthAttachmentDescriptor, )
Set the depth attachment.
C++ equivalent: void setDepthAttachment(const MTL::RenderPassDepthAttachmentDescriptor*)
Sourcepub fn stencil_attachment(
&self,
) -> Option<RenderPassStencilAttachmentDescriptor>
pub fn stencil_attachment( &self, ) -> Option<RenderPassStencilAttachmentDescriptor>
Get the stencil attachment.
C++ equivalent: MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment() const
Sourcepub fn set_stencil_attachment(
&self,
attachment: &RenderPassStencilAttachmentDescriptor,
)
pub fn set_stencil_attachment( &self, attachment: &RenderPassStencilAttachmentDescriptor, )
Set the stencil attachment.
C++ equivalent: void setStencilAttachment(const MTL::RenderPassStencilAttachmentDescriptor*)
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 get_sample_positions(&self, positions: &mut [SamplePosition]) -> UInteger
pub fn get_sample_positions(&self, positions: &mut [SamplePosition]) -> UInteger
Get sample positions.
C++ equivalent: NS::UInteger getSamplePositions(MTL::SamplePosition*, NS::UInteger)
Sourcepub fn set_sample_positions(&self, positions: &[SamplePosition])
pub fn set_sample_positions(&self, positions: &[SamplePosition])
Set sample positions.
C++ equivalent: void setSamplePositions(const MTL::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_raw(&self) -> *mut c_void
pub fn rasterization_rate_map_raw(&self) -> *mut c_void
Get the rasterization rate map (as raw pointer).
C++ equivalent: MTL::RasterizationRateMap* rasterizationRateMap() const
Sourcepub fn set_rasterization_rate_map_raw(&self, map: *const c_void)
pub fn set_rasterization_rate_map_raw(&self, map: *const c_void)
Set the rasterization rate map (from raw pointer).
C++ equivalent: void setRasterizationRateMap(const MTL::RasterizationRateMap*)
Sourcepub fn visibility_result_buffer(&self) -> Option<Buffer>
pub fn visibility_result_buffer(&self) -> Option<Buffer>
Get the visibility result buffer.
C++ equivalent: MTL::Buffer* visibilityResultBuffer() const
Sourcepub fn set_visibility_result_buffer(&self, buffer: &Buffer)
pub fn set_visibility_result_buffer(&self, buffer: &Buffer)
Set the visibility result buffer.
C++ equivalent: void setVisibilityResultBuffer(const MTL::Buffer*)
Sourcepub fn visibility_result_type(&self) -> VisibilityResultType
pub fn visibility_result_type(&self) -> VisibilityResultType
Get the visibility result type.
C++ equivalent: MTL::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(MTL::VisibilityResultType)
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)