Struct glin::Texture[][src]

pub struct Texture { /* fields omitted */ }

Wraps an OpenGL texture + some metadata about it's format

Methods

impl Texture
[src]

Returns true if the Texture is backed by a DSA backend

Upload data to the texture

The function will check that the data dimensions are correct for the passed format and the allocated size

Upload data to the texture

The function will check that the data dimensions are correct for the passed format and the allocated size. Also that the passed texture format is the same as the allocated internal

Returns the width of the allocated texture

Returns the height of the allocated texture

Returns the samples of the allocated texture

Returns the number of allocated levels

Returns the GL id

Returns the texture target

Returns the internal format

Swizzle from r -> rgb and g -> a

Useful to show grayscale or alpha + grayscale as grayscale instead of red tinted using the same shader one would use for an rgb(a) texture

Swizzle r -> component

Swizzle g -> component

Swizzle b -> component

Swizzle a -> component

Sets a group of Swizzles

Reads back the contents of the texture into the passed pixels

GL_TEXTURE_MAX_ANISOTROPY_EXT

GL_TEXTURE_BASE_LEVEL

GL_TEXTURE_MAX_LEVEL

GL_TEXTURE_MIN_LOD

GL_TEXTURE_MAX_LOD

GL_TEXTURE_MIN_MAG_FILTERS

GL_TEXTURE_WRAP_S

GL_TEXTURE_WRAP_T

GL_TEXTURE_WRAP_R

GL_TEXTURE_WIDTH

GL_TEXTURE_HEIGHT

GL_TEXTURE_INTERNAL_FORMAT

GL_TEXTURE_RED_TYPE

GL_TEXTURE_GREEN_TYPE

GL_TEXTURE_BLUE_TYPE

GL_TEXTURE_ALPHA_TYPE

GL_TEXTURE_COMPRESSED

GL_TEXTURE_COMPRESSED_IMAGE_SIZE

GL_TEXTURE_RED_SIZE

GL_TEXTURE_GREEN_SIZE

GL_TEXTURE_BLUE_SIZE

GL_TEXTURE_ALPHA_SIZE

GL_DEPTH_STENCIL_TEXTURE_MODE

GL_TEXTURE_MAG_FILTER

GL_TEXTURE_MIN_FILTER

GL_TEXTURE_MIN_LOD

GL_TEXTURE_MAX_LOD

GL_TEXTURE_BASE_LEVEL

GL_TEXTURE_MAX_LEVEL

GL_TEXTURE_SWIZZLE_R

GL_TEXTURE_SWIZZLE_G

GL_TEXTURE_SWIZZLE_B

GL_TEXTURE_SWIZZLE_A

GL_TEXTURE_SWIZZLE_RGBA

GL_TEXTURE_WRAP_S

GL_TEXTURE_WRAP_T

GL_TEXTURE_WRAP_R

GL_TEXTURE_BORDER_COLOR

GL_TEXTURE_COMPARE_MODE

GL_TEXTURE_COMPARE_FUNC

GL_IMAGE_FORMAT_COMPATIBILITY_TYPE

Important traits for Vec<u8>

glGenerateMipmaps

Returns the texture format

Trait Implementations

impl<T: Borrow<Texture>> AsUniform<Texture> for T
[src]

impl Drop for Texture
[src]

Executes the destructor for this type. Read more

impl Debug for Texture
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Texture
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Texture
[src]

Auto Trait Implementations

impl !Send for Texture

impl !Sync for Texture