pub struct GpuTextureDescriptor<'a> {
pub name: &'a str,
pub kind: GpuTextureKind,
pub pixel_kind: PixelKind,
pub mip_count: usize,
pub data: Option<&'a [u8]>,
pub base_level: usize,
pub max_level: usize,
}Expand description
Descriptor of a texture that is used to request textures from a graphics server.
Fields§
§name: &'a strName of the texture. This name is used only for debug purposes.
kind: GpuTextureKindKind of the texture. See GpuTextureKind docs for more info.
pixel_kind: PixelKindPixel kind of the texture. See PixelKind docs for more info.
mip_count: usizeTotal number of mips in the texture. Texture data must contain at least this number of mips.
data: Option<&'a [u8]>Optional data of the texture. If present, then the total number of bytes must match the required number of bytes defined by the texture kind, pixel kind, mip count.
base_level: usizeSpecifies the index of the lowest defined mipmap level. Keep in mind, that the texture data should provide the actual mip map level defined by the provided value, otherwise the rendering will be incorrect (probably just black on majority of implementations) and glitchy.
max_level: usizeSets the index of the highest defined mipmap level. Keep in mind, that the texture data should provide the actual mip map level defined by the provided value, otherwise the rendering will be incorrect (probably just black on majority of implementations) and glitchy.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GpuTextureDescriptor<'a>
impl<'a> RefUnwindSafe for GpuTextureDescriptor<'a>
impl<'a> Send for GpuTextureDescriptor<'a>
impl<'a> Sync for GpuTextureDescriptor<'a>
impl<'a> Unpin for GpuTextureDescriptor<'a>
impl<'a> UnwindSafe for GpuTextureDescriptor<'a>
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.