pub struct TextureParams {
pub width: usize,
pub height: usize,
pub format: MetalPixelFormat,
pub plane: usize,
}Expand description
Metal texture descriptor parameters for creating textures from IOSurface
This provides the information needed to configure a Metal MTLTextureDescriptor.
Fields§
§width: usizeWidth in pixels
height: usizeHeight in pixels
format: MetalPixelFormatRecommended Metal pixel format
plane: usizePlane index for multi-planar surfaces
Implementations§
Source§impl TextureParams
impl TextureParams
Sourcepub const fn metal_pixel_format(&self) -> u64
pub const fn metal_pixel_format(&self) -> u64
Get the raw MTLPixelFormat value for use with Metal APIs
Trait Implementations§
Source§impl Clone for TextureParams
impl Clone for TextureParams
Source§fn clone(&self) -> TextureParams
fn clone(&self) -> TextureParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextureParams
impl Debug for TextureParams
impl Copy for TextureParams
Auto Trait Implementations§
impl Freeze for TextureParams
impl RefUnwindSafe for TextureParams
impl Send for TextureParams
impl Sync for TextureParams
impl Unpin for TextureParams
impl UnwindSafe for TextureParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more