pub struct VertexDescriptor(/* private fields */);Expand description
Describes the organization of vertex data for a render pipeline.
C++ equivalent: MTL::VertexDescriptor
Implementations§
Source§impl VertexDescriptor
impl VertexDescriptor
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new vertex descriptor.
C++ equivalent: static VertexDescriptor* alloc()->init()
Sourcepub fn vertex_descriptor() -> Option<Self>
pub fn vertex_descriptor() -> Option<Self>
Create a new vertex descriptor using the class method.
C++ equivalent: static VertexDescriptor* vertexDescriptor()
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a VertexDescriptor from a raw pointer.
§Safety
The pointer must be a valid Metal vertex descriptor object.
Sourcepub fn layouts(&self) -> VertexBufferLayoutDescriptorArray
pub fn layouts(&self) -> VertexBufferLayoutDescriptorArray
Get the array of vertex buffer layout descriptors.
C++ equivalent: VertexBufferLayoutDescriptorArray* layouts() const
Sourcepub fn attributes(&self) -> VertexAttributeDescriptorArray
pub fn attributes(&self) -> VertexAttributeDescriptorArray
Get the array of vertex attribute descriptors.
C++ equivalent: VertexAttributeDescriptorArray* attributes() const
Trait Implementations§
Source§impl Clone for VertexDescriptor
impl Clone for VertexDescriptor
Source§impl Debug for VertexDescriptor
impl Debug for VertexDescriptor
Source§impl Drop for VertexDescriptor
impl Drop for VertexDescriptor
Source§impl Referencing for VertexDescriptor
impl Referencing for VertexDescriptor
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for VertexDescriptor
impl Sync for VertexDescriptor
Auto Trait Implementations§
impl Freeze for VertexDescriptor
impl RefUnwindSafe for VertexDescriptor
impl Unpin for VertexDescriptor
impl UnwindSafe for VertexDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more