[−][src]Struct gli_rs::Texture2DArray
2d array texture
Methods
impl Texture2DArray
[src]
pub fn new_empty() -> Texture2DArray
[src]
Create an empty texture 2D array.
pub fn new(
format: Format,
extent: Extent2d,
layers: usize,
levels: usize
) -> Texture2DArray
[src]
format: Format,
extent: Extent2d,
layers: usize,
levels: usize
) -> Texture2DArray
Create a texture2d_array and allocate a new storage_linear.
pub fn new_with_mipmap_chain(
format: Format,
extent: Extent2d,
layers: usize
) -> Texture2DArray
[src]
format: Format,
extent: Extent2d,
layers: usize
) -> Texture2DArray
Create a texture2d_array and allocate a new storage_linear with a complete mipmap chain.
pub fn share_from(texture: &impl GliTexture) -> Texture2DArray
[src]
Create a texture2d_array view with an existing storage_linear.
pub fn share_from_detail(
texture: &impl GliTexture,
format: Format,
base_layer: usize,
max_layer: usize,
base_face: usize,
max_face: usize,
base_level: usize,
max_level: usize
) -> Texture2DArray
[src]
texture: &impl GliTexture,
format: Format,
base_layer: usize,
max_layer: usize,
base_face: usize,
max_face: usize,
base_level: usize,
max_level: usize
) -> Texture2DArray
Create a texture2d_array view with an existing storage_linear.
pub fn share_from_subset(
texture: &Texture2DArray,
base_layer: usize,
max_layer: usize,
base_level: usize,
max_level: usize
) -> Texture2DArray
[src]
texture: &Texture2DArray,
base_layer: usize,
max_layer: usize,
base_level: usize,
max_level: usize
) -> Texture2DArray
Create a texture2d_array view, reference a subset of an existing texture2d_array instance.
pub fn get_layer(&self, layer: usize) -> Texture2D
[src]
Create a view of the texture identified by Layer in the texture array.
This method is equivalent to []
operator in C++ version.
Trait Implementations
impl GliTexture for Texture2DArray
[src]
const TARGET_TYPE: Target
[src]
type ExtentType = Extent2d
fn extent(&self, level: usize) -> Self::ExtentType
[src]
Return the corresponding extent type of the texture instance, which represents the size of a specific mip-level of this texture(width, height and depth). Read more
fn set_swizzles(&mut self, swizzles: Swizzles)
[src]
fn base_face(&self) -> usize
[src]
Return the base face of the texture instance, effectively a memory offset in the actual texture storage_type to identify where to start reading the faces. Read more
fn base_layer(&self) -> usize
[src]
Return the base layer of the texture instance, effectively a memory offset in the actual texture storage_type to identify where to start reading the layers. Read more
fn base_level(&self) -> usize
[src]
Return the base level of the texture instance, effectively a memory offset in the actual texture storage_type to identify where to start reading the levels. Read more
fn clear(&mut self)
[src]
Clear the entire texture storage_linear with zeros.
fn copy(
&mut self,
src_texture: &Self,
src_layer: usize,
src_face: usize,
src_level: usize,
dst_layer: usize,
dst_face: usize,
dst_level: usize
)
[src]
&mut self,
src_texture: &Self,
src_layer: usize,
src_face: usize,
src_level: usize,
dst_layer: usize,
dst_face: usize,
dst_level: usize
)
Copy a specific image of a texture.
fn copy_subset(
&mut self,
src_texture: &Self,
src_layer: usize,
src_face: usize,
src_level: usize,
src_offset: Extent3d,
dst_layer: usize,
dst_face: usize,
dst_level: usize,
dst_offset: Extent3d,
extent: Extent3d
)
[src]
&mut self,
src_texture: &Self,
src_layer: usize,
src_face: usize,
src_level: usize,
src_offset: Extent3d,
dst_layer: usize,
dst_face: usize,
dst_level: usize,
dst_offset: Extent3d,
extent: Extent3d
)
Copy a subset of a specific image of a texture.
fn data(&self) -> *const c_void
[src]
Return a pointer to the beginning of the texture instance data.
fn data_mut(&mut self) -> *mut c_void
[src]
fn empty(&self) -> bool
[src]
Return whether the texture instance is empty, no storage_type or description have been assigned to the instance.
fn faces(&self) -> usize
[src]
Return max_face() - base_face() + 1.
fn format(&self) -> Format
[src]
Return the texture instance format.
fn layers(&self) -> usize
[src]
Return max_layer() - base_layer() + 1.
fn levels(&self) -> usize
[src]
Return max_level() - base_level() + 1.
fn max_face(&self) -> usize
[src]
Return the max face of the texture instance, effectively a memory offset to the beginning of the last face in the actual texture storage_type that the texture instance can access. Read more
fn max_layer(&self) -> usize
[src]
Return the max layer of the texture instance, effectively a memory offset to the beginning of the last layer in the actual texture storage_type that the texture instance can access. Read more
fn max_level(&self) -> usize
[src]
Return the max level of the texture instance, effectively a memory offset to the beginning of the last level in the actual texture storage_type that the texture instance can access. Read more
fn size(&self) -> usize
[src]
Return the memory size of a texture instance storage_type in bytes.
fn size_at_level(&self, level: usize) -> usize
[src]
Return the memory size of a specific level identified by Level.
fn target(&self) -> Target
[src]
Return the target of a texture instance.
impl Eq for Texture2DArray
[src]
impl PartialEq<Texture2DArray> for Texture2DArray
[src]
fn eq(&self, other: &Texture2DArray) -> bool
[src]
Compare two textures. Two textures are the same when the data, the format and the targets are the same.
fn ne(&self, other: &Texture2DArray) -> bool
[src]
Compare two textures. Two textures are the same when the data, the format and the targets are the same.
Auto Trait Implementations
impl Send for Texture2DArray
impl Sync for Texture2DArray
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,