[−][src]Struct blaze_rs::texture::Texture
Defines a texture.
Fields
id: u32
OpenGL texture ID
width: u32
Width in pixels
height: u32
Height in pixels
Methods
impl<'a> Texture<'a>
[src]
pub fn set_filtering(
&self,
minification: TextureFilter,
magnification: TextureFilter
) -> CallResult
[src]
&self,
minification: TextureFilter,
magnification: TextureFilter
) -> CallResult
Sets the texture filtering options for this texture when the texture is minified and magnified.
pub fn set_wrap(&self, x: TextureWrap, y: TextureWrap) -> CallResult
[src]
Sets the texture wrapping options for each axis.
pub fn from_memory(
bytes: &Bytes,
channels: ImageChannels,
texture_id: Option<u32>,
flags: ImageFlags
) -> Result<Texture<'a>, String>
[src]
bytes: &Bytes,
channels: ImageChannels,
texture_id: Option<u32>,
flags: ImageFlags
) -> Result<Texture<'a>, String>
Loads a texture from memory. A supported image file data must be supplied.
pub fn from_file(
path: &str,
channels: ImageChannels,
texture_id: Option<u32>,
flags: ImageFlags
) -> Result<Texture<'a>, String>
[src]
path: &str,
channels: ImageChannels,
texture_id: Option<u32>,
flags: ImageFlags
) -> Result<Texture<'a>, String>
Loads a texture from file. A supported image file must be supplied.
pub fn get_max_slots() -> u32
[src]
Returns maximum available slots for multitexturing.
pub fn bind(texture: Option<&Texture>, slot: u32) -> CallResult
[src]
Binds or unbinds a texture to specified slot, starting from slot 0. If a texture is bound to slot 0, it overrides the texture used by draw calls.
Trait Implementations
impl<'a> PartialEq<Texture<'a>> for Texture<'a>
[src]
impl<'a> Eq for Texture<'a>
[src]
impl<'a> Drop for Texture<'a>
[src]
impl<'a> Debug for Texture<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?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>,