pub struct SamplerState(/* private fields */);Expand description
An object that defines how texture coordinates map to texels.
C++ equivalent: MTL::SamplerState
Implementations§
Source§impl SamplerState
impl SamplerState
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a SamplerState from a raw pointer.
§Safety
The pointer must be a valid Metal sampler state object.
Sourcepub fn label(&self) -> Option<String>
pub fn label(&self) -> Option<String>
Get the label for this sampler state.
C++ equivalent: NS::String* label() const
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this sampler state.
C++ equivalent: Device* device() const
Sourcepub fn gpu_resource_id(&self) -> ResourceID
pub fn gpu_resource_id(&self) -> ResourceID
Get the GPU resource ID for bindless access.
C++ equivalent: ResourceID gpuResourceID() const
Trait Implementations§
Source§impl Clone for SamplerState
impl Clone for SamplerState
Source§impl Debug for SamplerState
impl Debug for SamplerState
Source§impl Drop for SamplerState
impl Drop for SamplerState
Source§impl Referencing for SamplerState
impl Referencing for SamplerState
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 SamplerState
impl Sync for SamplerState
Auto Trait Implementations§
impl Freeze for SamplerState
impl RefUnwindSafe for SamplerState
impl Unpin for SamplerState
impl UnwindSafe for SamplerState
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