Texture binding + creation

Closes #49
Interesting! I need to read more about texture storage.

Regards,
Dzmitry

> On Jul 19, 2014, at 14:27, Corey Richardson <notifications@github.com> wrote:
> 
> In src/device/gl/tex.rs:
> 
> > +        }
> > +    }
> > +}
> > +
> > +/// Common texture creation routine, just binds and sets mipmap ranges.
> > +fn make_texture(info: ::tex::TextureInfo) -> Texture {
> > +    let mut name = 0 as Texture;
> > +    unsafe {
> > +        gl::GenTextures(1, &mut name);
> > +    }
> > +
> > +    let k = kind_to_gl(info.kind);
> > +    gl::BindTexture(k, name);
> > +
> > +    let (base, max) = info.mipmap_range;
> > +    gl::TexParameteri(k, gl::TEXTURE_BASE_LEVEL, base as GLint);
> It doesn't just affect sampling, it also affects TexStorage. Once created with given mipmap ranges, they can only shrink, never expand.
> 
> —
> Reply to this email directly or view it on GitHub.