pub fn create_monochrome_1d(&mut self, width: u16) {
        unsafe {
            let texture_id      = self.texture.texture_id;
            self.texture_target = gl::TEXTURE_1D;
            self.texture_format = gl::RED;
            self.width          = width as _;
            self.height         = 1;

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

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

            gl::TexImage1D(gl::TEXTURE_1D, 0, gl::RED as _, width as _, 0, gl::RED, gl::UNSIGNED_BYTE, ptr::null());

            panic_on_gl_error("Create 1D mono 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_monochrome_1d(&mut self, width: u16) {
        unsafe {
            let texture_id      = self.texture.texture_id;
            self.texture_target = gl::TEXTURE_1D;
            self.texture_format = gl::RED;
            self.width          = width as _;
            self.height         = 1;
            gl::BindTexture(gl::TEXTURE_1D, texture_id);
            gl::TexParameteri(gl::TEXTURE_1D, gl::TEXTURE_MIN_FILTER, gl::LINEAR as i32);
            gl::TexParameteri(gl::TEXTURE_1D, gl::TEXTURE_MAG_FILTER, gl::LINEAR as i32);
            gl::TexImage1D(gl::TEXTURE_1D, 0, gl::RED as _, width as _, 0, gl::RED, gl::UNSIGNED_BYTE, ptr::null());
            panic_on_gl_error("Create 1D mono texture");
        }
    }
pub fn create_monochrome_1d ( & mut self , width : u16 ) { unsafe { let texture_id = self . texture . texture_id ; self . texture_target = gl :: TEXTURE_1D ; self . texture_format = gl :: RED ; self . width = width as _ ; self . height = 1 ; gl :: BindTexture ( gl :: TEXTURE_1D , texture_id ) ; gl :: TexParameteri ( gl :: TEXTURE_1D , gl :: TEXTURE_MIN_FILTER , gl :: LINEAR as i32 ) ; gl :: TexParameteri ( gl :: TEXTURE_1D , gl :: TEXTURE_MAG_FILTER , gl :: LINEAR as i32 ) ; gl :: TexImage1D ( gl :: TEXTURE_1D , 0 , gl :: RED as _ , width as _ , 0 , gl :: RED , 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