[][src]Struct gli_rs::Texture2D

pub struct Texture2D { /* fields omitted */ }

2d texture

Methods

impl Texture2D[src]

pub fn new_empty() -> Texture2D[src]

Create an empty texture 2D.

pub fn new(format: Format, extent: Extent2d, levels: usize) -> Texture2D[src]

Create a texture2d and allocate a new storage_linear.

pub fn new_with_mipmap_chain(format: Format, extent: Extent2d) -> Texture2D[src]

Create a texture2d and allocate a new storage_linear with a complete mipmap chain.

pub fn share_from(texture: &impl GliTexture) -> Texture2D[src]

Create a texture2d 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
) -> Texture2D
[src]

Create a texture2d view with an existing storage_linear.

pub fn share_from_subset(
    texture: &Texture2D,
    base_level: usize,
    max_level: usize
) -> Texture2D
[src]

Create a texture2d view, reference a subset of an existing texture2d instance.

pub fn get_level(&self, level: usize) -> GliImage[src]

Create a view of the image identified by Level in the mipmap chain of the texture.

This method is equivalent to [] operator in C++ version.

Trait Implementations

impl GliTexture for Texture2D[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]

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]

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 Texture2D[src]

impl PartialEq<Texture2D> for Texture2D[src]

fn eq(&self, other: &Texture2D) -> 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: &Texture2D) -> 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 Texture2D

impl Sync for Texture2D

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]