pub fn new(texture_unit: gl::types::GLenum) -> Self {
        let mut texture_id: gl::types::GLuint = 0;
        unsafe {
            gl::GenTextures(1, &mut texture_id);
        }

        Self {
            texture_id,
            texture_unit,
        }
    }
/// Generates a new texture unit.
Generates a new texture unit.
Generates a new texture unit .
pub fn new(texture_unit: gl::types::GLenum) -> Self {
        let mut texture_id: gl::types::GLuint = 0;
        unsafe {
            gl::GenTextures(1, &mut texture_id);
        }
        Self {
            texture_id,
            texture_unit,
        }
    }
pub fn new ( texture_unit : gl :: types :: GLenum ) -> Self { let mut texture_id : gl :: types :: GLuint = 0 ; unsafe { gl :: GenTextures ( 1 , & mut texture_id ) ; } Self { texture_id , texture_unit , } }
Generates a new texture unit.
Generates a new texture unit .
texture_unit
gl::types::GLenum
texture_unit
gl::types::GLenum