Skip to main content

RenderPassDescriptor

Struct RenderPassDescriptor 

Source
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

Source

pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>

Create a RenderPassDescriptor from a raw pointer.

Source

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

Get the raw pointer.

Source

pub fn new() -> Option<Self>

Create a new render pass descriptor.

Source

pub fn color_attachments( &self, ) -> Option<RenderPassColorAttachmentDescriptorArray>

Get the color attachments array.

C++ equivalent: MTL::RenderPassColorAttachmentDescriptorArray* colorAttachments() const

Source

pub fn depth_attachment(&self) -> Option<RenderPassDepthAttachmentDescriptor>

Get the depth attachment.

C++ equivalent: MTL::RenderPassDepthAttachmentDescriptor* depthAttachment() const

Source

pub fn set_depth_attachment( &self, attachment: &RenderPassDepthAttachmentDescriptor, )

Set the depth attachment.

C++ equivalent: void setDepthAttachment(const MTL::RenderPassDepthAttachmentDescriptor*)

Source

pub fn stencil_attachment( &self, ) -> Option<RenderPassStencilAttachmentDescriptor>

Get the stencil attachment.

C++ equivalent: MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment() const

Source

pub fn set_stencil_attachment( &self, attachment: &RenderPassStencilAttachmentDescriptor, )

Set the stencil attachment.

C++ equivalent: void setStencilAttachment(const MTL::RenderPassStencilAttachmentDescriptor*)

Source

pub fn render_target_width(&self) -> UInteger

Get the render target width.

C++ equivalent: NS::UInteger renderTargetWidth() const

Source

pub fn set_render_target_width(&self, width: UInteger)

Set the render target width.

C++ equivalent: void setRenderTargetWidth(NS::UInteger)

Source

pub fn render_target_height(&self) -> UInteger

Get the render target height.

C++ equivalent: NS::UInteger renderTargetHeight() const

Source

pub fn set_render_target_height(&self, height: UInteger)

Set the render target height.

C++ equivalent: void setRenderTargetHeight(NS::UInteger)

Source

pub fn render_target_array_length(&self) -> UInteger

Get the render target array length.

C++ equivalent: NS::UInteger renderTargetArrayLength() const

Source

pub fn set_render_target_array_length(&self, length: UInteger)

Set the render target array length.

C++ equivalent: void setRenderTargetArrayLength(NS::UInteger)

Source

pub fn default_raster_sample_count(&self) -> UInteger

Get the default raster sample count.

C++ equivalent: NS::UInteger defaultRasterSampleCount() const

Source

pub fn set_default_raster_sample_count(&self, count: UInteger)

Set the default raster sample count.

C++ equivalent: void setDefaultRasterSampleCount(NS::UInteger)

Source

pub fn get_sample_positions(&self, positions: &mut [SamplePosition]) -> UInteger

Get sample positions.

C++ equivalent: NS::UInteger getSamplePositions(MTL::SamplePosition*, NS::UInteger)

Source

pub fn set_sample_positions(&self, positions: &[SamplePosition])

Set sample positions.

C++ equivalent: void setSamplePositions(const MTL::SamplePosition*, NS::UInteger)

Source

pub fn tile_width(&self) -> UInteger

Get the tile width.

C++ equivalent: NS::UInteger tileWidth() const

Source

pub fn set_tile_width(&self, width: UInteger)

Set the tile width.

C++ equivalent: void setTileWidth(NS::UInteger)

Source

pub fn tile_height(&self) -> UInteger

Get the tile height.

C++ equivalent: NS::UInteger tileHeight() const

Source

pub fn set_tile_height(&self, height: UInteger)

Set the tile height.

C++ equivalent: void setTileHeight(NS::UInteger)

Source

pub fn threadgroup_memory_length(&self) -> UInteger

Get the threadgroup memory length.

C++ equivalent: NS::UInteger threadgroupMemoryLength() const

Source

pub fn set_threadgroup_memory_length(&self, length: UInteger)

Set the threadgroup memory length.

C++ equivalent: void setThreadgroupMemoryLength(NS::UInteger)

Source

pub fn imageblock_sample_length(&self) -> UInteger

Get the imageblock sample length.

C++ equivalent: NS::UInteger imageblockSampleLength() const

Source

pub fn set_imageblock_sample_length(&self, length: UInteger)

Set the imageblock sample length.

C++ equivalent: void setImageblockSampleLength(NS::UInteger)

Source

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

Get the rasterization rate map (as raw pointer).

C++ equivalent: MTL::RasterizationRateMap* rasterizationRateMap() const

Source

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*)

Source

pub fn visibility_result_buffer(&self) -> Option<Buffer>

Get the visibility result buffer.

C++ equivalent: MTL::Buffer* visibilityResultBuffer() const

Source

pub fn set_visibility_result_buffer(&self, buffer: &Buffer)

Set the visibility result buffer.

C++ equivalent: void setVisibilityResultBuffer(const MTL::Buffer*)

Source

pub fn visibility_result_type(&self) -> VisibilityResultType

Get the visibility result type.

C++ equivalent: MTL::VisibilityResultType visibilityResultType() const

Source

pub fn set_visibility_result_type(&self, result_type: VisibilityResultType)

Set the visibility result type.

C++ equivalent: void setVisibilityResultType(MTL::VisibilityResultType)

Source

pub fn support_color_attachment_mapping(&self) -> bool

Check if color attachment mapping is supported.

C++ equivalent: bool supportColorAttachmentMapping() const

Source

pub fn set_support_color_attachment_mapping(&self, support: bool)

Set whether color attachment mapping is supported.

C++ equivalent: void setSupportColorAttachmentMapping(bool)

Trait Implementations§

Source§

impl Clone for RenderPassDescriptor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RenderPassDescriptor

Source§

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

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

impl Default for RenderPassDescriptor

Source§

fn default() -> Self

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

impl Drop for RenderPassDescriptor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Referencing for RenderPassDescriptor

Source§

fn as_ptr(&self) -> *const c_void

Get the raw pointer to the Objective-C object.
Source§

fn as_mut_ptr(&self) -> *mut c_void

Get the raw mutable pointer to the Objective-C object.
Source§

fn retain(&self) -> Self
where Self: Clone,

Retain the object, incrementing its reference count. Read more
Source§

fn release(&self)

Release the object, decrementing its reference count. Read more
Source§

fn autorelease(&self) -> Self
where Self: Clone,

Autorelease the object. Read more
Source§

fn retain_count(&self) -> usize

Get the retain count of the object. Read more
Source§

impl Send for RenderPassDescriptor

Source§

impl Sync for RenderPassDescriptor

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.