pub fn new() -> Texture {
        let mut texture = 0;

        unsafe {
            gl::GenTextures(1, &mut texture);
            gl::BindTexture(gl::TEXTURE_2D, texture);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::NEAREST as GLint);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::NEAREST as GLint);
        }

        Texture {
            texture: texture,
            format: TextureFormat::RGB_8,
            width: 0,
            height: 0,
        }
    }
/// Creates a new texture without any ascociated data. Use can use [`load_file`],
/// [`load_raw_image_data`] and [`load_data`] to set the data to be used used
/// with this texture.
///
/// [`load_file`]:           struct.Texture.html#method.load_file
/// [`load_raw_image_data`]: struct.Texture.html#method.load_raw_image_data
/// [`load_data`]:           struct.Texture.html#method.load_data
Creates a new texture without any ascociated data.


Creates a new texture without any ascociated data .
pub fn new() -> Texture {
        let mut texture = 0;
        unsafe {
            gl::GenTextures(1, &mut texture);
            gl::BindTexture(gl::TEXTURE_2D, texture);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::NEAREST as GLint);
            gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::NEAREST as GLint);
        }
        Texture {
            texture: texture,
            format: TextureFormat::RGB_8,
            width: 0,
            height: 0,
        }
    }
pub fn new ( ) -> Texture { let mut texture = 0 ; unsafe { gl :: GenTextures ( 1 , & mut texture ) ; gl :: BindTexture ( gl :: TEXTURE_2D , texture ) ; gl :: TexParameteri ( gl :: TEXTURE_2D , gl :: TEXTURE_MAG_FILTER , gl :: NEAREST as GLint ) ; gl :: TexParameteri ( gl :: TEXTURE_2D , gl :: TEXTURE_MIN_FILTER , gl :: NEAREST as GLint ) ; } Texture { texture : texture , format : TextureFormat :: RGB_8 , width : 0 , height : 0 , } }
Creates a new texture without any ascociated data.
Creates a new texture without any ascociated data .