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§
fn rootResource(&self) -> Option<Retained<ProtocolObject<dyn MTLResource>>>
👎Deprecated: Use parentTexture or buffer instead
fn parentTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
fn parentRelativeLevel(&self) -> NSUInteger
fn parentRelativeSlice(&self) -> NSUInteger
fn buffer(&self) -> Option<Retained<ProtocolObject<dyn MTLBuffer>>>
Available on crate feature
MTLBuffer only.fn bufferOffset(&self) -> NSUInteger
fn bufferBytesPerRow(&self) -> NSUInteger
fn iosurfacePlane(&self) -> NSUInteger
fn textureType(&self) -> MTLTextureType
fn pixelFormat(&self) -> MTLPixelFormat
Available on crate feature
MTLPixelFormat only.fn width(&self) -> NSUInteger
fn height(&self) -> NSUInteger
fn depth(&self) -> NSUInteger
fn mipmapLevelCount(&self) -> NSUInteger
fn sampleCount(&self) -> NSUInteger
fn arrayLength(&self) -> NSUInteger
fn usage(&self) -> MTLTextureUsage
fn isFramebufferOnly(&self) -> bool
fn firstMipmapInTail(&self) -> NSUInteger
fn tailSizeInBytes(&self) -> NSUInteger
fn isSparse(&self) -> bool
fn allowGPUOptimizedContents(&self) -> bool
unsafe fn compressionType(&self) -> MTLTextureCompressionType
unsafe fn gpuResourceID(&self) -> MTLResourceID
Available on crate feature
MTLTypes only.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 )
Available on crate feature
MTLTypes only.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 )
Available on crate feature
MTLTypes only.unsafe fn getBytes_bytesPerRow_fromRegion_mipmapLevel( &self, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger, region: MTLRegion, level: NSUInteger )
Available on crate feature
MTLTypes only.unsafe fn replaceRegion_mipmapLevel_withBytes_bytesPerRow( &self, region: MTLRegion, level: NSUInteger, pixel_bytes: NonNull<c_void>, bytes_per_row: NSUInteger )
Available on crate feature
MTLTypes only.fn newTextureViewWithPixelFormat( &self, pixel_format: MTLPixelFormat ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
Available on crate feature
MTLPixelFormat only.unsafe fn newTextureViewWithPixelFormat_textureType_levels_slices( &self, pixel_format: MTLPixelFormat, texture_type: MTLTextureType, level_range: NSRange, slice_range: NSRange ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
Available on crate feature
MTLPixelFormat only.fn remoteStorageTexture( &self ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
unsafe fn newRemoteTextureViewForDevice( &self, device: &ProtocolObject<dyn MTLDevice> ) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>
Available on crate feature
MTLDevice only.fn swizzle(&self) -> MTLTextureSwizzleChannels
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>>>
Available on crate feature
MTLPixelFormat only.