pub struct VertexBufferLayoutDescriptor(/* private fields */);Expand description
Describes the layout of vertex data in a buffer.
C++ equivalent: MTL::VertexBufferLayoutDescriptor
Implementations§
Source§impl VertexBufferLayoutDescriptor
impl VertexBufferLayoutDescriptor
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new vertex buffer layout descriptor.
C++ equivalent: static VertexBufferLayoutDescriptor* alloc()->init()
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a VertexBufferLayoutDescriptor from a raw pointer.
§Safety
The pointer must be a valid Metal vertex buffer layout descriptor object.
Sourcepub fn stride(&self) -> UInteger
pub fn stride(&self) -> UInteger
Get the stride, in bytes, between vertex data in the buffer.
C++ equivalent: NS::UInteger stride() const
Sourcepub fn set_stride(&self, stride: UInteger)
pub fn set_stride(&self, stride: UInteger)
Set the stride, in bytes, between vertex data in the buffer.
C++ equivalent: void setStride(NS::UInteger stride)
Sourcepub fn step_function(&self) -> VertexStepFunction
pub fn step_function(&self) -> VertexStepFunction
Get the step function that determines how the data is fetched.
C++ equivalent: VertexStepFunction stepFunction() const
Sourcepub fn set_step_function(&self, step_function: VertexStepFunction)
pub fn set_step_function(&self, step_function: VertexStepFunction)
Set the step function that determines how the data is fetched.
C++ equivalent: void setStepFunction(MTL::VertexStepFunction stepFunction)
Sourcepub fn step_rate(&self) -> UInteger
pub fn step_rate(&self) -> UInteger
Get the step rate that determines how often the data is fetched.
C++ equivalent: NS::UInteger stepRate() const
Sourcepub fn set_step_rate(&self, step_rate: UInteger)
pub fn set_step_rate(&self, step_rate: UInteger)
Set the step rate that determines how often the data is fetched.
C++ equivalent: void setStepRate(NS::UInteger stepRate)