pub struct cp_drawable_array { /* private fields */ }Available on crate feature
drawable only.Expand description
Implementations§
Source§impl cp_drawable_array
impl cp_drawable_array
Sourcepub unsafe fn drawable(
drawable_array: cp_drawable_array_t,
index: usize,
) -> cp_drawable_t
pub unsafe fn drawable( drawable_array: cp_drawable_array_t, index: usize, ) -> cp_drawable_t
Returns the drawable at the specified index in the array.
- Parameters:
- drawable_array: The drawable array for a frame.
- index: The index of the drawable you want. The index must
be greater than or equal to
0and less than the value thatcp_drawable_array_get_countreturns. - Returns: The drawable available for drawing at the specified index.
The cp_drawable_t type contains the textures and other
information you need to set up your render descriptor in Metal.
§Safety
drawable_array must be a valid pointer.
Sourcepub unsafe fn count(drawable_array: cp_drawable_array_t) -> usize
pub unsafe fn count(drawable_array: cp_drawable_array_t) -> usize
Returns the number of drawables in the array.
- Parameters:
- drawable_array: The drawable array for a frame.
- Returns: The number of drawables available for drawing. For example, a return
value of
2indicates there are two drawables for this frame.
Use the returned value as the maximum number of textures to retrieve
from the cp_drawable_array_get_drawable functions.
§Safety
drawable_array must be a valid pointer.
Trait Implementations§
Source§impl Debug for cp_drawable_array
impl Debug for cp_drawable_array
Source§impl RefEncode for cp_drawable_array
impl RefEncode for cp_drawable_array
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Auto Trait Implementations§
impl !Freeze for cp_drawable_array
impl !RefUnwindSafe for cp_drawable_array
impl !Send for cp_drawable_array
impl !Sync for cp_drawable_array
impl !Unpin for cp_drawable_array
impl !UnwindSafe for cp_drawable_array
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