MTLResourceViewPool

Trait MTLResourceViewPool 

Source
pub unsafe trait MTLResourceViewPool: NSObjectProtocol {
    // Provided methods
    fn baseResourceID(&self) -> MTLResourceID
       where Self: Sized + Message { ... }
    fn resourceViewCount(&self) -> NSUInteger
       where Self: Sized + Message { ... }
    fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>
       where Self: Sized + Message { ... }
    fn label(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    unsafe fn copyResourceViewsFromPool_sourceRange_destinationIndex(
        &self,
        source_pool: &ProtocolObject<dyn MTLResourceViewPool>,
        source_range: NSRange,
        destination_index: NSUInteger,
    ) -> MTLResourceID
       where Self: Sized + Message { ... }
}
Available on crate feature MTLResourceViewPool only.
Expand description

Contains views over resources of a specific type, and allows you to manage those views.

See also Apple’s documentation

Provided Methods§

Source

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

Available on crate feature MTLTypes only.

Obtains the resource ID corresponding to the resource view at index 0 in this resource view pool.

Source

fn resourceViewCount(&self) -> NSUInteger
where Self: Sized + Message,

Queries the number of resource views that this pool contains.

Source

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

Available on crate feature MTLDevice only.

Obtains a reference to the GPU device this pool belongs to.

Source

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

Queries the optional debug label of this resource view pool.

Source

unsafe fn copyResourceViewsFromPool_sourceRange_destinationIndex( &self, source_pool: &ProtocolObject<dyn MTLResourceViewPool>, source_range: NSRange, destination_index: NSUInteger, ) -> MTLResourceID
where Self: Sized + Message,

Available on crate feature MTLTypes only.

Copies a range of resource views from a source view pool to a destination location in this view pool.

  • Parameters:

  • sourcePool: resource view pool from which to copy resource views.

  • sourceRange: The range in the source resource view pool to copy.

  • destinationIndex: The starting index in this destination view pool into which to copy the source range of resource views.

  • Returns: The MTLResourceID of the resource view corresponding to destinationIndex of the copy in this resource view pool.

§Safety
  • sourceRange might not be bounds-checked.
  • destinationIndex might not be bounds-checked.

Trait Implementations§

Source§

impl ProtocolType for dyn MTLResourceViewPool

Source§

const NAME: &'static str = "MTLResourceViewPool"

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 MTLResourceViewPool

Implementations on Foreign Types§

Source§

impl<T> MTLResourceViewPool for ProtocolObject<T>

Implementors§