MTLSamplerState

Trait MTLSamplerState 

Source
pub unsafe trait MTLSamplerState:
    NSObjectProtocol
    + Send
    + Sync {
    // Provided methods
    fn label(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
       where Self: Sized + Message { ... }
    fn gpuResourceID(&self) -> MTLResourceID
       where Self: Sized + Message { ... }
}
Available on crate feature MTLSampler only.
Expand description

An immutable collection of sampler state compiled for a single device.

See also Apple’s documentation

Provided Methods§

Source

fn label(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

A string to help identify this object.

Source

fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
where Self: Sized + Message,

Available on crate feature MTLDevice only.

The device this resource was created against. This resource can only be used with this device.

Source

fn gpuResourceID(&self) -> MTLResourceID
where Self: Sized + Message,

Available on crate feature MTLTypes only.

Handle of the GPU resource suitable for storing in an Argument Buffer

Trait Implementations§

Source§

impl ProtocolType for dyn MTLSamplerState

Source§

const NAME: &'static str = "MTLSamplerState"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MTLSamplerState

Implementations on Foreign Types§

Source§

impl<T> MTLSamplerState for ProtocolObject<T>
where T: ?Sized + MTLSamplerState,

Implementors§