Trait glitter::context::texture_context::ContextTextureExt [] [src]

pub trait ContextTextureExt: BaseContext {
    unsafe fn gen_texture<TX: TextureType>(&self) -> Texture<TX> { ... }
fn set_min_filter<T, F>(&self, gl_texture: &mut T, filter: F)
    where
        T: TextureBinding,
        F: Into<TextureMipmapFilter>
, { ... }
fn set_mag_filter<T>(&self, gl_texture: &mut T, filter: TextureFilter)
    where
        T: TextureBinding
, { ... }
fn set_wrap_s<T>(&self, gl_texture: &mut T, wrap_mode: TextureWrapMode)
    where
        T: TextureBinding
, { ... }
fn set_wrap_t<T>(&self, gl_texture: &mut T, wrap_mode: TextureWrapMode)
    where
        T: TextureBinding
, { ... }
fn generate_mipmap<T>(&self, gl_texture: &mut T)
    where
        T: TextureBinding
, { ... }
fn tex_image_2d<T, U, I: ?Sized>(
        &self,
        _gl_texture: &mut T,
        target: U,
        level: u32,
        img: &I
    )
    where
        T: TextureBinding,
        U: Into<<T::TextureType as TextureType>::ImageTargetType>,
        I: Image2d
, { ... }
fn tex_image_2d_empty<T, I>(
        &self,
        _gl_texture: &mut T,
        target: I,
        level: u32,
        format: ImageFormat,
        width: u32,
        height: u32
    )
    where
        T: TextureBinding,
        I: ImageTargetType
, { ... } }

An extension trait that includes texture-related OpenGL methods.

Provided Methods

Create a new texture with no storage or image data.

Safety

Many OpenGL functions assume a texture object will be texture-complete. Violating this invariant is considered undefined behavior.

See also

gl.build_texture_2d: A safe wrapper for building 2D textures.

glGenTextures OpenGL docs

Set a texture's minifying filter.

See also

glTexParameter OpenGL docs

Set a texture's magnifying filter.

See also

glTexParameter OpenGL docs

Set a texture's wrap mode for the s-coordinate.

See also

glTexParameter OpenGL docs

Set a texture's wrap mode for the t-coordinate.

See also

glTexParameter OpenGL docs

Generate a set of mipmaps for a texture object.

See also

glGenerateMipmap OpenGL docs

Upload 2D image data to a texture object's image target.

  • _gl_texture: The binding of the texture object.
  • target: The texture's 2D image target to upload the image data to.
  • level: The mipmap level to upload the image data to.
  • img: The image data to upload.

Set a texture object's image target to an empty image with the specified parameters.

  • _gl_texture: The binding of the texture object.
  • target: The texture's 2D image target to set.
  • level: The mipmap level to set.
  • format: The image format to use to use for the texture's data store.
  • width: The width to set for the texture's data store.
  • height: The height to set for the texture's data store.

Implementors