BufferFormatApi

Struct BufferFormatApi 

Source
#[repr(C)]
pub struct BufferFormatApi { pub encode_uncompressed_format: Option<unsafe extern "C" fn(component_type: BufferComponentType, sign: bool, bits_x: u8, bits_y: u8, bits_z: u8, bits_w: u8) -> u32>, pub encode_compressed_format: Option<unsafe extern "C" fn(compression_type: BufferCompressionFormat) -> u32>, pub is_compressed: Option<unsafe extern "C" fn(format: u32) -> bool>, pub decode_uncompressed: Option<unsafe extern "C" fn(format: u32, component_type: *mut BufferComponentType, sign: *mut bool, bits_x: *mut u8, bits_y: *mut u8, bits_z: *mut u8, bits_w: *mut u8) -> bool>, pub decode_compression_format: Option<unsafe extern "C" fn(format: u32, compression_format: *mut BufferCompressionFormat) -> bool>, pub bits_per_element: Option<unsafe extern "C" fn(format: u32) -> u32>, pub num_components: Option<unsafe extern "C" fn(format: u32) -> u32>, pub human_readable: Option<unsafe extern "C" fn(format: u32, ta: *mut TempAllocatorI) -> *const c_char>, }

Fields§

§encode_uncompressed_format: Option<unsafe extern "C" fn(component_type: BufferComponentType, sign: bool, bits_x: u8, bits_y: u8, bits_z: u8, bits_w: u8) -> u32>§encode_compressed_format: Option<unsafe extern "C" fn(compression_type: BufferCompressionFormat) -> u32>§is_compressed: Option<unsafe extern "C" fn(format: u32) -> bool>§decode_uncompressed: Option<unsafe extern "C" fn(format: u32, component_type: *mut BufferComponentType, sign: *mut bool, bits_x: *mut u8, bits_y: *mut u8, bits_z: *mut u8, bits_w: *mut u8) -> bool>§decode_compression_format: Option<unsafe extern "C" fn(format: u32, compression_format: *mut BufferCompressionFormat) -> bool>§bits_per_element: Option<unsafe extern "C" fn(format: u32) -> u32>§num_components: Option<unsafe extern "C" fn(format: u32) -> u32>§human_readable: Option<unsafe extern "C" fn(format: u32, ta: *mut TempAllocatorI) -> *const c_char>

Implementations§

Source§

impl BufferFormatApi

Source

pub unsafe fn encode_uncompressed_format( &self, component_type: BufferComponentType, sign: bool, bits_x: u8, bits_y: u8, bits_z: u8, bits_w: u8, ) -> u32

Source

pub unsafe fn encode_compressed_format( &self, compression_type: BufferCompressionFormat, ) -> u32

Source

pub unsafe fn is_compressed(&self, format: u32) -> bool

Source

pub unsafe fn decode_uncompressed( &self, format: u32, component_type: *mut BufferComponentType, sign: *mut bool, bits_x: *mut u8, bits_y: *mut u8, bits_z: *mut u8, bits_w: *mut u8, ) -> bool

Source

pub unsafe fn decode_compression_format( &self, format: u32, compression_format: *mut BufferCompressionFormat, ) -> bool

Source

pub unsafe fn bits_per_element(&self, format: u32) -> u32

Source

pub unsafe fn num_components(&self, format: u32) -> u32

Source

pub unsafe fn human_readable( &self, format: u32, ta: *mut TempAllocatorI, ) -> *const c_char

Trait Implementations§

Source§

impl Api for BufferFormatApi

Source§

impl Clone for BufferFormatApi

Source§

fn clone(&self) -> BufferFormatApi

Returns a duplicate 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 Default for BufferFormatApi

Source§

fn default() -> BufferFormatApi

Returns the “default value” for a type. Read more
Source§

impl Copy for BufferFormatApi

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<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.