Trait objc2_metal::MTLTexture

source ·
pub unsafe trait MTLTexture: MTLResource + IsRetainable {
Show 36 methods // Provided methods fn rootResource(&self) -> Option<Retained<ProtocolObject<dyn MTLResource>>> where Self: Sized + Message { ... } fn parentTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>> where Self: Sized + Message { ... } fn parentRelativeLevel(&self) -> NSUInteger where Self: Sized + Message { ... } fn parentRelativeSlice(&self) -> NSUInteger where Self: Sized + Message { ... } fn buffer(&self) -> Option<Retained<ProtocolObject<dyn MTLBuffer>>> where Self: Sized + Message { ... } fn bufferOffset(&self) -> NSUInteger where Self: Sized + Message { ... } fn bufferBytesPerRow(&self) -> NSUInteger where Self: Sized + Message { ... } fn iosurfacePlane(&self) -> NSUInteger where Self: Sized + Message { ... } fn textureType(&self) -> MTLTextureType where Self: Sized + Message { ... } fn pixelFormat(&self) -> MTLPixelFormat where Self: Sized + Message { ... } fn width(&self) -> NSUInteger where Self: Sized + Message { ... } fn height(&self) -> NSUInteger where Self: Sized + Message { ... } fn depth(&self) -> NSUInteger where Self: Sized + Message { ... } fn mipmapLevelCount(&self) -> NSUInteger where Self: Sized + Message { ... } fn sampleCount(&self) -> NSUInteger where Self: Sized + Message { ... } fn arrayLength(&self) -> NSUInteger where Self: Sized + Message { ... } fn usage(&self) -> MTLTextureUsage where Self: Sized + Message { ... } fn isShareable(&self) -> bool where Self: Sized + Message { ... } fn isFramebufferOnly(&self) -> bool where Self: Sized + Message { ... } fn firstMipmapInTail(&self) -> NSUInteger where Self: Sized + Message { ... } fn tailSizeInBytes(&self) -> NSUInteger where Self: Sized + Message { ... } fn isSparse(&self) -> bool where Self: Sized + Message { ... } fn allowGPUOptimizedContents(&self) -> bool where Self: Sized + Message { ... } unsafe fn compressionType(&self) -> MTLTextureCompressionType where Self: Sized + Message { ... } unsafe fn gpuResourceID(&self) -> MTLResourceID where Self: Sized + Message { ... } unsafe fn getBytes_bytesPerRow_bytesPerImage_fromRegion_mipmapLevel_slice( &self, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, bytes_per_image: NSUInteger, region: MTLRegion, level: NSUInteger, slice: NSUInteger ) where Self: Sized + Message { ... } unsafe fn replaceRegion_mipmapLevel_slice_withBytes_bytesPerRow_bytesPerImage( &self, region: MTLRegion, level: NSUInteger, slice: NSUInteger, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, bytes_per_image: NSUInteger ) where Self: Sized + Message { ... } unsafe fn getBytes_bytesPerRow_fromRegion_mipmapLevel( &self, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, region: MTLRegion, level: NSUInteger ) where Self: Sized + Message { ... } unsafe fn replaceRegion_mipmapLevel_withBytes_bytesPerRow( &self, region: MTLRegion, level: NSUInteger, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger ) where Self: Sized + Message { ... } fn newTextureViewWithPixelFormat( &self, pixel_format: MTLPixelFormat ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>> where Self: Sized + Message { ... } unsafe fn newTextureViewWithPixelFormat_textureType_levels_slices( &self, pixel_format: MTLPixelFormat, texture_type: MTLTextureType, level_range: NSRange, slice_range: NSRange ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>> where Self: Sized + Message { ... } fn newSharedTextureHandle(&self) -> Option<Retained<MTLSharedTextureHandle>> where Self: Sized + Message { ... } fn remoteStorageTexture( &self ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>> where Self: Sized + Message { ... } unsafe fn newRemoteTextureViewForDevice( &self, device: &ProtocolObject<dyn MTLDevice> ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>> where Self: Sized + Message { ... } fn swizzle(&self) -> MTLTextureSwizzleChannels where Self: Sized + Message { ... } unsafe fn newTextureViewWithPixelFormat_textureType_levels_slices_swizzle( &self, pixel_format: MTLPixelFormat, texture_type: MTLTextureType, level_range: NSRange, slice_range: NSRange, swizzle: MTLTextureSwizzleChannels ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>> where Self: Sized + Message { ... }
}
Available on crate features MTLResource and MTLTexture only.

Provided Methods§

source

fn rootResource(&self) -> Option<Retained<ProtocolObject<dyn MTLResource>>>
where Self: Sized + Message,

👎Deprecated: Use parentTexture or buffer instead
source

fn parentTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
where Self: Sized + Message,

source

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

source

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

source

fn buffer(&self) -> Option<Retained<ProtocolObject<dyn MTLBuffer>>>
where Self: Sized + Message,

Available on crate feature MTLBuffer only.
source

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

source

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

source

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

source

fn textureType(&self) -> MTLTextureType
where Self: Sized + Message,

source

fn pixelFormat(&self) -> MTLPixelFormat
where Self: Sized + Message,

Available on crate feature MTLPixelFormat only.
source

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

source

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

source

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

source

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

source

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

source

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

source

fn usage(&self) -> MTLTextureUsage
where Self: Sized + Message,

source

fn isShareable(&self) -> bool
where Self: Sized + Message,

source

fn isFramebufferOnly(&self) -> bool
where Self: Sized + Message,

source

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

source

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

source

fn isSparse(&self) -> bool
where Self: Sized + Message,

source

fn allowGPUOptimizedContents(&self) -> bool
where Self: Sized + Message,

source

unsafe fn compressionType(&self) -> MTLTextureCompressionType
where Self: Sized + Message,

source

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

Available on crate feature MTLTypes only.
source

unsafe fn getBytes_bytesPerRow_bytesPerImage_fromRegion_mipmapLevel_slice( &self, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, bytes_per_image: NSUInteger, region: MTLRegion, level: NSUInteger, slice: NSUInteger )
where Self: Sized + Message,

Available on crate feature MTLTypes only.
source

unsafe fn replaceRegion_mipmapLevel_slice_withBytes_bytesPerRow_bytesPerImage( &self, region: MTLRegion, level: NSUInteger, slice: NSUInteger, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, bytes_per_image: NSUInteger )
where Self: Sized + Message,

Available on crate feature MTLTypes only.
source

unsafe fn getBytes_bytesPerRow_fromRegion_mipmapLevel( &self, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, region: MTLRegion, level: NSUInteger )
where Self: Sized + Message,

Available on crate feature MTLTypes only.
source

unsafe fn replaceRegion_mipmapLevel_withBytes_bytesPerRow( &self, region: MTLRegion, level: NSUInteger, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger )
where Self: Sized + Message,

Available on crate feature MTLTypes only.
source

fn newTextureViewWithPixelFormat( &self, pixel_format: MTLPixelFormat ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
where Self: Sized + Message,

Available on crate feature MTLPixelFormat only.
source

unsafe fn newTextureViewWithPixelFormat_textureType_levels_slices( &self, pixel_format: MTLPixelFormat, texture_type: MTLTextureType, level_range: NSRange, slice_range: NSRange ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
where Self: Sized + Message,

Available on crate feature MTLPixelFormat only.
source

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

source

fn remoteStorageTexture( &self ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
where Self: Sized + Message,

source

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

Available on crate feature MTLDevice only.
source

fn swizzle(&self) -> MTLTextureSwizzleChannels
where Self: Sized + Message,

source

unsafe fn newTextureViewWithPixelFormat_textureType_levels_slices_swizzle( &self, pixel_format: MTLPixelFormat, texture_type: MTLTextureType, level_range: NSRange, slice_range: NSRange, swizzle: MTLTextureSwizzleChannels ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
where Self: Sized + Message,

Available on crate feature MTLPixelFormat only.

Trait Implementations§

source§

impl ProtocolType for dyn MTLTexture

source§

const NAME: &'static str = "MTLTexture"

The name of the Objective-C protocol that this type represents.
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 MTLTexture
where T: ?Sized + Message + MTLTexture,

Implementations on Foreign Types§

source§

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

Implementors§