pub fn create_empty(&mut self, width: u16, height: u16) {
        unsafe {
            let texture_id      = self.texture.texture_id;
            self.texture_target = gl::TEXTURE_2D;
            self.texture_format = gl::RGBA;
            self.width          = width as _;
            self.height         = height as _;

            gl::BindTexture(gl::TEXTURE_2D, texture_id);

            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::LINEAR as i32);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::LINEAR as i32);

            gl::TexImage2D(gl::TEXTURE_2D, 0, gl::RGBA as _, width as _, height as _, 0, gl::RGBA, gl::UNSIGNED_BYTE, ptr::null());

            panic_on_gl_error("Create texture");
        }
    }
///
/// Associates an empty image with this texture
///
Associates an empty image with this texture
Associates an empty image with this texture
pub fn create_empty(&mut self, width: u16, height: u16) {
        unsafe {
            let texture_id      = self.texture.texture_id;
            self.texture_target = gl::TEXTURE_2D;
            self.texture_format = gl::RGBA;
            self.width          = width as _;
            self.height         = height as _;
            gl::BindTexture(gl::TEXTURE_2D, texture_id);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::LINEAR as i32);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::LINEAR as i32);
            gl::TexImage2D(gl::TEXTURE_2D, 0, gl::RGBA as _, width as _, height as _, 0, gl::RGBA, gl::UNSIGNED_BYTE, ptr::null());
            panic_on_gl_error("Create texture");
        }
    }
pub fn create_empty ( & mut self , width : u16 , height : u16 ) { unsafe { let texture_id = self . texture . texture_id ; self . texture_target = gl :: TEXTURE_2D ; self . texture_format = gl :: RGBA ; self . width = width as _ ; self . height = height as _ ; gl :: BindTexture ( gl :: TEXTURE_2D , texture_id ) ; gl :: TexParameteri ( gl :: TEXTURE_2D , gl :: TEXTURE_MIN_FILTER , gl :: LINEAR as i32 ) ; gl :: TexParameteri ( gl :: TEXTURE_2D , gl :: TEXTURE_MAG_FILTER , gl :: LINEAR as i32 ) ; gl :: TexImage2D ( gl :: TEXTURE_2D , 0 , gl :: RGBA as _ , width as _ , height as _ , 0 , gl :: RGBA , gl :: UNSIGNED_BYTE , ptr :: null ( ) ) ; panic_on_gl_error ( " " ) ; } }
Associates an empty image with this texture
Associates an empty image with this texture
&mut self
width
u16
height
u16