pub fn bind_texture(&self, unit: u32) {
        unsafe {
            gl::ActiveTexture(gl::TEXTURE0 + unit);
            gl::BindTexture(gl::TEXTURE_BUFFER, self.texture);

            // Ensure that the internal buffer has not replaced its internal buffer object under us
            let bound = self.bound_buffer.get();
            if *bound != self.buffer.buffer {
                gl::TexBuffer(gl::TEXTURE_BUFFER, self.format, self.buffer.buffer);
                *bound = self.buffer.buffer;
            }
        }
    }
/// Binds this buffer to the given texture unit. Note that this binds the texture to the 
/// `gl::TEXTURE_BUFFER` target.
Binds this buffer to the given texture unit. Note that this binds the texture to the
`gl::TEXTURE_BUFFER` target.
Binds this buffer to the given texture unit . Note that this binds the texture to the ` gl :: TEXTURE_BUFFER ` target .
pub fn bind_texture(&self, unit: u32) {
        unsafe {
            gl::ActiveTexture(gl::TEXTURE0 + unit);
            gl::BindTexture(gl::TEXTURE_BUFFER, self.texture);
            // Ensure that the internal buffer has not replaced its internal buffer object under us
            let bound = self.bound_buffer.get();
            if *bound != self.buffer.buffer {
                gl::TexBuffer(gl::TEXTURE_BUFFER, self.format, self.buffer.buffer);
                *bound = self.buffer.buffer;
            }
        }
    }
pub fn bind_texture ( & self , unit : u32 ) { unsafe { gl :: ActiveTexture ( gl :: TEXTURE0 + unit ) ; gl :: BindTexture ( gl :: TEXTURE_BUFFER , self . texture ) ; // Ensure that the internal buffer has not replaced its internal buffer object under us let bound = self . bound_buffer . get ( ) ; if * bound != self . buffer . buffer { gl :: TexBuffer ( gl :: TEXTURE_BUFFER , self . format , self . buffer . buffer ) ; * bound = self . buffer . buffer ; } } }
Binds this buffer to the given texture unit.
Binds this buffer to the given texture unit .
&self
unit
u32
&self
unit
u32