Struct Texture

Source
pub struct Texture(/* private fields */);

Methods from Deref<Target = TextureRef>ยง

Source

pub fn root_resource(&self) -> Option<&ResourceRef>

๐Ÿ‘ŽDeprecated since 0.13.0
Source

pub fn parent_texture(&self) -> Option<&TextureRef>

Source

pub fn parent_relative_level(&self) -> u64

Source

pub fn parent_relative_slice(&self) -> u64

Source

pub fn buffer(&self) -> Option<&BufferRef>

Source

pub fn buffer_offset(&self) -> u64

Source

pub fn buffer_stride(&self) -> u64

Source

pub fn texture_type(&self) -> MTLTextureType

Source

pub fn pixel_format(&self) -> MTLPixelFormat

Source

pub fn width(&self) -> u64

Source

pub fn height(&self) -> u64

Source

pub fn depth(&self) -> u64

Source

pub fn mipmap_level_count(&self) -> u64

Source

pub fn sample_count(&self) -> u64

Source

pub fn array_length(&self) -> u64

Source

pub fn usage(&self) -> MTLTextureUsage

Source

pub fn framebuffer_only(&self) -> bool

Source

pub fn get_bytes( &self, bytes: *mut c_void, stride: u64, region: MTLRegion, mipmap_level: u64, )

Source

pub fn get_bytes_in_slice( &self, bytes: *mut c_void, stride: u64, image_stride: u64, region: MTLRegion, mipmap_level: u64, slice: u64, )

Source

pub fn replace_region( &self, region: MTLRegion, mipmap_level: u64, bytes: *const c_void, stride: u64, )

Source

pub fn replace_region_in_slice( &self, region: MTLRegion, mipmap_level: u64, slice: u64, bytes: *const c_void, stride: u64, image_stride: u64, )

Source

pub fn new_texture_view(&self, pixel_format: MTLPixelFormat) -> Texture

Source

pub fn new_texture_view_from_slice( &self, pixel_format: MTLPixelFormat, texture_type: MTLTextureType, mipmap_levels: NSRange, slices: NSRange, ) -> Texture

Source

pub fn gpu_resource_id(&self) -> MTLResourceID

Methods from Deref<Target = ResourceRef>ยง

Source

pub fn device(&self) -> &DeviceRef

Source

pub fn label(&self) -> &str

Source

pub fn set_label(&self, label: &str)

Source

pub fn cpu_cache_mode(&self) -> MTLCPUCacheMode

Source

pub fn storage_mode(&self) -> MTLStorageMode

Source

pub fn set_purgeable_state(&self, state: MTLPurgeableState) -> MTLPurgeableState

Source

pub fn allocated_size(&self) -> u64

Only available on macOS 10.13+ & iOS 10.11+

Source

pub fn hazard_tracking_mode(&self) -> MTLHazardTrackingMode

Only available on macos(10.15), ios(13.0)

Source

pub fn resource_options(&self) -> MTLResourceOptions

Only available on macos(10.15), ios(13.0)

Source

pub fn heap(&self) -> &HeapRef

Only available on macos(10.13), ios(10.0)

Source

pub fn heap_offset(&self) -> u64

Only available on macos(10.15), ios(13.0)

Source

pub fn make_aliasable(&self)

Only available on macos(10.13), ios(10.0)

Source

pub fn is_aliasable(&self) -> bool

Only available on macos(10.13), ios(10.0)

Methods from Deref<Target = NsObjectRef>ยง

Trait Implementationsยง

Sourceยง

impl AsMut<TextureRef> for Texture

Sourceยง

fn as_mut(&mut self) -> &mut TextureRef

Converts this type into a mutable reference of the (usually inferred) input type.
Sourceยง

impl AsRef<TextureRef> for Texture

Sourceยง

fn as_ref(&self) -> &TextureRef

Converts this type into a shared reference of the (usually inferred) input type.
Sourceยง

impl Borrow<TextureRef> for Texture

Sourceยง

fn borrow(&self) -> &TextureRef

Immutably borrows from an owned value. Read more
Sourceยง

impl BorrowMut<TextureRef> for Texture

Sourceยง

fn borrow_mut(&mut self) -> &mut TextureRef

Mutably borrows from an owned value. Read more
Sourceยง

impl Clone for Texture

Sourceยง

fn clone(&self) -> Texture

Returns a copy of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for Texture

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Sourceยง

impl Deref for Texture

Sourceยง

type Target = TextureRef

The resulting type after dereferencing.
Sourceยง

fn deref(&self) -> &TextureRef

Dereferences the value.
Sourceยง

impl DerefMut for Texture

Sourceยง

fn deref_mut(&mut self) -> &mut TextureRef

Mutably dereferences the value.
Sourceยง

impl Drop for Texture

Sourceยง

fn drop(&mut self)

Executes the destructor for this type. Read more
Sourceยง

impl ForeignType for Texture

Sourceยง

type CType = MTLTexture

The raw C type.
Sourceยง

type Ref = TextureRef

The type representing a reference to this type.
Sourceยง

unsafe fn from_ptr(ptr: *mut MTLTexture) -> Texture

Constructs an instance of this type from its raw type. Read more
Sourceยง

fn as_ptr(&self) -> *mut MTLTexture

Returns a raw pointer to the wrapped value.
Sourceยง

fn into_ptr(self) -> *mut Self::CType

Consumes the wrapper and returns the raw pointer.
Sourceยง

impl Send for Texture

Sourceยง

impl Sync for Texture

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dst: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Sourceยง

type Target = T

๐Ÿ”ฌThis is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<T> AutoreleaseSafe for T
where T: ?Sized,