[][src]Struct three_d::core::texture::Texture2D

pub struct Texture2D {
    pub width: usize,
    pub height: usize,
    // some fields omitted
}

Fields

width: usizeheight: usize

Methods

impl Texture2D[src]

pub fn new(
    gl: &Gl,
    width: usize,
    height: usize,
    min_filter: Interpolation,
    mag_filter: Interpolation,
    wrap_s: Wrapping,
    wrap_t: Wrapping
) -> Result<Texture2D, Error>
[src]

pub fn new_empty(
    gl: &Gl,
    width: usize,
    height: usize,
    min_filter: Interpolation,
    mag_filter: Interpolation,
    wrap_s: Wrapping,
    wrap_t: Wrapping,
    format: Format
) -> Result<Texture2D, Error>
[src]

pub fn new_from_bytes(
    gl: &Gl,
    min_filter: Interpolation,
    mag_filter: Interpolation,
    wrap_s: Wrapping,
    wrap_t: Wrapping,
    bytes: &[u8]
) -> Result<Texture2D, Error>
[src]

pub fn new_from_file(
    gl: &Gl,
    min_filter: Interpolation,
    mag_filter: Interpolation,
    wrap_s: Wrapping,
    wrap_t: Wrapping,
    path: &str
) -> Result<Texture2D, Error>
[src]

pub fn set_interpolation(
    &self,
    min_filter: Interpolation,
    mag_filter: Interpolation
)
[src]

pub fn set_wrapping(&self, wrap_s: Wrapping, wrap_t: Wrapping)[src]

pub fn fill_with_u8(&mut self, width: usize, height: usize, data: &[u8])[src]

pub fn fill_with_f32(&mut self, width: usize, height: usize, data: &[f32])[src]

Trait Implementations

impl Drop for Texture2D[src]

impl Texture for Texture2D[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

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

impl<T> SetParameter for T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.