Implements the TextureAtlas type.

A texture atlas is used to tightly pack arbitrarily many images
into a single texture.

The actual implementation is based on the article by Jukka Jylänki:
"A Thousand Ways to Pack the Bin - A Practical Approach to
Two-Dimensional Rectangle Bin Packing", February 27, 2010.

More precisely: this is an implementation of the
'Skyline Bottom-Left' algorithm.
Merge pull request #10 from jteeuwen/master

Texture atlas
Merge pull request #11 from pwaller/master

Update .travis.yml: Now use initialize and renamed functions
Use color.Color and color.RGBA instead of inventing our own
Merge pull request #12 from pwaller/image-color

Use image/color rather than defining a new struct
Adds the 'Sizeof' function. It returns the byte size of the given
OpenGL type for the current machine/GL implementation.
This is necessary to reliably compute element offsets in components
like vertex-, color-, normal-, texture- and index-buffers.
Implements the MeshBuffer, Mesh and MeshDescriptor types.
A MeshBuffer allows us to buffer multiple meshes and render them
efficiently. A Mesh supports vertices, normals, colors, texture
coords and indices.
Adds note to README about Mesh buffer and Texture Atlas.
Fixes some typos in code comments.
Adds MeshBuffer.Delete(). This allows us to delete a mesh from
the buffer by its index. This is the index returned by
MeshBuffer.Append().
glh.MeshBuffer: Renames Append to 'Add' and 'Delete' to 'Remove'.
glh.MeshBuffer: Merge render code for Render and RenderItem into
a single internal method. This removes a fair bit of code
duplication.

Fixes render() to always enable the client state for vertex arrays.
This should not be conditional, regardless of whether we have
actual vertices or not.
glh.MeshBuffer: Removes duplicate Commit call.
glh.MeshBuffer: Fixes code comments.
Merge pull request #14 from jteeuwen/master

MeshBuffer
glh.MeshBuffer: Major overhaul of Meshbuffer.

Previously, the meshbuffer was fixed to using UNSIGNED_INT for indices
and FLOAT for all vertex data. Additionally, it always used 14 floats
to represents a single vertex, regardless of whether any of them where
ever used. This caused major space requirement overhead.

This new implementation accepts Mesh attributes as part of the buffer
constructor. These attributes define the exact type and size of each
vertex component (position, color, tex coords, normals).

This allows us to explicitly define how big each vertex component
should be and what data type it should carry. Additionally, we can define
the storage method per component. The storage method being any of
GL_STATIC_DRAW, GL_DYNAMIC_DRAW or GL_STREAM_DRAW. This gives fine grained
control over where each of the vertex components will be stored.

    mb := NewMeshBuffer(
        // Indices: 1 unsigned int per index, static data.
        NewUint32Attr(1, gl.STATIC_DRAW),

        // Positions: 2 integers, static data.
        NewInt32Attr(2, gl.STATIC_DRAW),

        // Colors: 3 floats, changing regularly.
        NewFloat32Attr(3, gl.DYNAMIC_DRAW),

        nil, // No vertex normals.
        nil, // No texture coords.
    )

This example creates a buffer which accepts 1 unsigned integer for
each index. 2 floats for the vertex position (x/y) and 3 floats
for the vertex color (r/g/b). By supplying nil for the normal
and texture-coord attributes, we are telling the buffer to omit
storage for these alltogether. These will therefor not allocate
any gl buffers, nor any excess space in the MeshBuffer itself.

The example also demonstrates how the indices and positions use
STATIC_DRAW. This means we expect them to never change. They can
therefore be stored directly in GPU memory. The Color is expected
to change, so we define it as DYNAMIC_DRAW, which stores it in
AGP memory.

Loading a mesh into this buffer us very simple:

    idx := []uint32{0, 1, 2, 3}
    pos := []int32{0, 0, 0, 0, 0, 0, 0, 0}
    clr := []float32{1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1}
    ....
    mb.Add(idx, pos, clr, nil, nil)

Note that we use the same data types for each component as was
defined in the meshbuffer attributes. And since we told it there
would be no texcoord and normal data, we supply nil for these two
in the Add() call as well.

Just like the previous version, this version uses separate buffers
for each vertex component (pos, color, texcoords, normals). Initially I
intended to merge them all into a single, interleaved buffer. I quickly
realized this would turn into a major mess to maintain. Additionally,
it would not allow us to specify the storage type for each component.

Consider the example above, where the indices and position data are
static, and the colors are expected to change regularly. When putting
all data into a single buffer, one change to a color would require us
to upload the entire data set to the GPU. With this new implementation,
that is not necessary. It is designed to notice when any of the datasets
are modified and will then automatically re-commit them to the GPU
independently.
Merge pull request #17 from jteeuwen/master

Major overhaul of Meshbuffer.
glh.MeshBuffer: Fixes bug in MeshBuffer.Add.
Merge pull request #18 from jteeuwen/master

Fixes some minor issues in glh.MeshBuffer
Fixes issue #19