Texture binding + creation

Closes #49
The LOD coefficient is computed from the derivatives of texturd coordinates, so it is floating point by nature. Its fractional part is used to weight corresponding closest mipmap levels. Hence, we need LOD bias to be float. As for Metal - we'll just report a warning for any non-zero value.

Regards,
Dzmitry

> On Jul 19, 2014, at 14:12, Corey Richardson <notifications@github.com> wrote:
> 
> In src/device/tex.rs:
> 
> > +    /// the default.
> > +    Tile,
> > +    /// Mirror the texture. Like tile, but uses abs(coord) before the modulo.
> > +    Mirror,
> > +    /// Clamp the texture to the value at `0.0` or `1.0` respectively.
> > +    Clamp,
> > +}
> > +
> > +/// Specifies how to sample from a texture.
> > +#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
> > +pub struct SamplerInfo {
> > +    pub filtering: FilterMethod,
> > +    /// This bias is added to every computed mipmap level (N + lod_bias). For
> > +    /// example, if it would select mipmap level 2 and lod_bias is 1, it will
> > +    /// use mipmap level 3.
> > +    pub lod_bias: u8,
> I can't find this feature at all in Metal, weirdly enough. Fractional bias doesn't make sense to me, and the structure doesn't pack well if it was an f32. If it makes sense to be a float though, I'll change it.
> 
> —
> Reply to this email directly or view it on GitHub.