Skip to main content

create_texture

Function create_texture 

Source
pub fn create_texture(
    bytes: &[u8],
    size: Size2D,
    fmt: &ImgFormat,
    filter: &ImgFilter,
    wrap: &ImgWrap,
) -> u32
Expand description

Creates a new OpenGL 2D texture from raw pixel data.

Generates mipmaps automatically. The texture is left bound to texture unit 0 after creation.