Add support for OpenGL float textures

In addition to floating point textures, this PR also improves the GLSL backend in several important ways:

- Adds support for optional OpenGL features, either via extensions or by querying the version number.
- Proper support for  one- and two-channel images (either via texture_rg extension or OpenGL >= 3.0)
- improve compatibility with modern OpenGL versions (vertex array objects are required when using OpenGL > 3.1 but unavailable in earlier versions)
- better runtime code for opening an OpenGL context on Linux (use legacy glX API only when nothing else is supported)

Please take a look
I made the default error handler append a newline if there isn't one
already, so it's fine with either convention. Let's leave newlines off for
now, assuming that custom halide_errors are going to embed the message in a
larger printf call.

On Thu, Sep 18, 2014 at 9:06 AM, Daniel Heck <notifications@github.com>
wrote:

> In src/runtime/opengl.cpp:
>
> >          GLint type = GL_UNSIGNED_BYTE;
> > -        if (!get_texture_format(user_context, buf, &format, &type)) {
> > -            error(user_context) << "Invalid texture format";
> > +        if (!get_texture_format(user_context, buf, &internal_format, &format, &type)) {
> > +            error(user_context) << "Invalid texture format\n";
>
> In this case it was simply a merge error. I found a few other places where
> I used a newline at the end of an error message. I'm fine with either
> convention, but it might make sense to aim for consistency and make
> debug(), print() and error() all behave the same wrt. newlines.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/halide/Halide/pull/472/files#r17736790>.
>