Fix broken nacl build
Rename Regal::RegalTexC to Regal::Emu::TexC
RegalSo sRGB support for ES 2.0
Add support for masking the buffer bits used for MD5 hashing purposes
RegalSo fixes and optimizations.
Helper functions for pixel components and bytes per component.
Fixes for native client/PPAPI Linux

1) A few places assumed REGAL_SYS_PPAPI meant Windows/MSVC when in fact
Pepper is a valid option on Mac and Linux as well.

2) Initialize maxVaryings to zero before calling GetIntegerv. Pepper
GLES GetIntegerv for better or worse asserts that the output destination
memory is initialized to zero or negative one, though I saw nothing in
the spec that indicates it is required.
README.rst: Add download link
GitHub doesn't support Downloads anymore
Merge branch 'fix_nacl_build' of git://github.com/samclegg/regal
Merge branch 'ppapi_linux_fixes' of git://github.com/adhoc-bobcat/regal
Merge branch 'patch-1' of git://github.com/techtonik/regal
Resolve compiler warning for RegalFrame.cpp.
Bring in Google Mock

  * Integrate Google Mock (at their trunk SVN revision 410 --
    http://code.google.com/p/googlemock/source/detail?r=410). Note only
    a subset of files are included (things like the LICENSE file, the include/
    directory, and the src/ directory)

  * Revise the build rules for libgtest. Just compile gmock-all.cc, and
    also compile gmock-all.cc to build a libgtest that includes both
    Google Test and Google Mock. Initially I had a separate library, but
    I didn't think it made sense to keep them separate.

  * Add a RegalDispatchGMock.py dispatch generator, which generates
    test/RegalDispatchGMock.cpp/.h, which in turn takes the C style
    functions used by the Regal dispatch table and turns them into calls on
    a Google Mock implementation. Modifies scripts/Export.py to know about
    a test source code directory, and to invoke the new code generator.

  * Add testRegalState.cpp which requires Google Mock work correctly, and
    which adds a simple test that Regal::State::Depth::Set() invokes
    the right series of calls in the dispatch layer in order to set a new
    depth state.

  * Remove the demonstrative test I added to tests/test_main.cpp, as there
    are now many tests and this one was not valuable beyond the "Google
    Test works" stage.

  * Fix the null build. `make` and then `make` immediately afterwards
    was rebuilding libraries since the libraries depended on the lib/
    subdirectory, but that directory ended up with a modification time
    later than that of the library, causing make to think it needed to
    build the library again on the next round. Likewise there were
    dependencies on bin/ for things that were then built into bin/.
    Rather than having a rule `bin: mkdir -p bin`, I modified other
    rules to do a `mkdir -p $(dir $@)` to ensure the destination
    directory existed before running the linker or archiver.

  * Fix a few other dependency issues I uncovered when doing `make clean
    && make -j20`, where some libraries were being used before being
    built.

Caveats -- Please read!

  1. Google Mock does quite a bit of code generation through its macros
     and templated implementation. RegalDispatchGMock.cpp can take
     minutes to compile, due to the size of the API. On my machine,
     the output .o file is a huge 24 megabyte binary.

  2. The incremental compile time is also unfortunately a bit large.
     Touching testRegalState.cpp means reading and expanding the macros
     in RegalDispatchMock.h, which takes tens of seconds to do.

     Unfortunately with the way that Google Mock interfaces are defined,
     there is no seperation of the mock interface from its
     implementation. All tests that include RegalDispatchMock.h will
     incur overhead in expanding macros and setting up class data for the
     full API.

  3. Google Mock by default only supports functions with at most ten
     arguments. There were a handful of functions that are larger than
     this in the dispatch interface. I chose to set up the code
     generator to silently ignore these calls rather than forwarding
     them to the generated mock interface.

     Google Mock contains a number of .pump files which define a default
     call arity of 10, and it is perfectly possible to invoke
     googletest/scripts/pump.py to regenerate these files to allow for a
     larger arity, but I felt that keeping the default for now was fine.

     Regal looks like it needs an arity of 15 if all functions are to be
     mocked.
Implement glPopAttrib(GL_TRANFORM_BIT)

Extend the existing RegalPPa/RegalState functionality to add support for
saving and restoring the server side transform state.

Unlike the other emulated functionlity in RegalState, the code I added
does minimize the state transitions, which is especially a good idea if
the backend does not support certain state (such as clip planes) that
may not be actually set by the Regal client.

Extends the testRegalState test to fully cover the new state code. Adds
a quick test for the PushAttrib/PopAttrib calls.

Half of the fix for Regal Issue #27.
Prune back RegalDispatchGMock interface for better build turn-around time.
Refresh GLEW sources.
Add freeglut sources.
Logging refinements for glPush/PopMatrix and display list compilation.
boost::print::string_list::pop_front and pop_back added.
Utility function for loading a file into a std::string added.
Refresh VC10 projects for regaltest purposes.
Merge branch 'implement_ppa_transform_bit' of git://github.com/adhoc-bobcat/regal
Rename Regal::RegalPpa -> Regal::Emu:Ppa
use std::swap_ranges for swapping arrays.
Make the dispatch table initializers available to regaltest.
White-list more GL functions into RegalDispatchGMock, for regaltest purposes.
freeglut tidy-up for possible upstreaming.
For X11/EGL mode, include additional X11 headers that would have come from GL/EGL.h
VC 10 project fixups for building regaltest
Extend clip plane enum support to GL_CLIP_PLANE6, GL_CLIP_PLANE7
Add category annotation for GL_VERSION_2_0 entry points
Extend RegalDispatchGMock to GL_VERSION_2_0, in addition to 1.0 and 1.1
Enable info/warning/error logging for release-mode builds.  REGAL_LOG=0 to disable.
Fixups for texture image size helpers.
DSA emulation fixes.
boost::print logging fix for quoting NULL c-strings.
boost::print logging fix for NULL arrays.
Implement RegalPpca

Add Push/PopClientAttribute emulation for Regal, allowing the full
OpenGL 4.3 compatability profile pixel and vertex array states to be
saved and restored.

These notes and the implementation are based on
glspec43.compatability.20120806.pdf, as well as
http://www.opengl.org/registry/specs/EXT/direct_state_access.txt

This is needed when running on top of a back-end which does not support it
(GLES2), when the caller is an more general OpenGL client.

Specifically, the state mentioned in Tables 23.4 - 23.8 identified as
"vertex array", and the state in Tables 23.34 and 23.35 identified as
"pixel-store" is what is saved and restored.

For the pixel store state, this was straightforward. For the vertex
array state, this was more involved than I initially expected, leading
to this rather large patch. Sorry.

I implemented this version with the following in mind:

  * The client state tracking should not constrain itself to the client
    state actually supported by the back-end. If the client for example
    calls glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE), we record and
    attempt to restore this change in state even if the back-end is
    GLES2 which does not support it. If the client never makes this
    call, then we never attempt to touch this state on restore.

    It is assumed that for GLES2 and other similarly restrictive
    back-ends that some other emulation layer will handle it as needed.

  * Primarily this change is about implementing emulated versions of
    glPushClientAttrib and glPopClientAttrib. All "global" client state
    is tracked. Note that some calls would set state inside a Vertex
    Array Object if one is bound, and this code ignores those calls
    since that goes beyond what was needed. Also, while it implements
    glGet for the purposes of constraining certain attribute count
    limits and other maximums, it does not otherwise implement any
    real functionality to get the shadowed client state.

  * Beyond the compatability profile specification, I only handled the
    Direct State Access extension, as there was already the RegalDsa
    module present to emulate it. I pass the calls through after
    shadowing the state, but in restoring state, I went and made the
    more stateful calls without using that extension.

  * I did my best to track the spec properly. There are a few corner
    cases I did not properly handle.

      1. This code does not know what buffers and vertex array objects,
         etc. are properly allocated. The specification calls for the
         interface to not allow an unallocated named object to be bound,
         which should mean that this shadowing interface should ignore
         the attempt.

      2. Between the glBegin() / glEnd() call pair, calls other than
         those to set single vertex attributes should fail. The
         specification calls out a limited set of functions which might
         not (10.8.5, after the errors box).

      3. I was uncertain what to do if a state saved on the stack
         contained a named object that was deleted. While I check the
         current state, and effectively unbind, I did not do so for the
         state stack. Some similar handling might need to be done for
         bound objects stored inside a Vertex Array Object.

As I neared the end of the work on this patch, I strongly felt that the
following should really be done further down the line:

  * With this change, Regal now has much redundancy in code that tracks
    client state. I was really tempted to help clean this up, but I
    don't feel like I have the time.

    I feel like the emulation layer should implement one or more modules
    to shadow OpenGL state, which should be all they do. I could see
    making them configurable so that for example if vertex array state
    was not needed, no attempt would be made to shadow it.

    Other modules can then "require" this layer to work. RegalPpca would
    then just implement the state stacks, and the Push/pop
    functionality.

    I'm hoping at least that you will find my implementation at least a
    good starting point for this unification. I checked it numerous
    times.

  * In working through this patch, I looked briefly at the code in
    RegalIff, RegalVao, and RegalPpc (the last of which is not
    apparently used, and appeared to be the closest to what I wanted to
    do in this patch). I used them to cross check my version, but I did
    not directly use them as I felt each of them was incomplete (not
    implementing all the interfaces, not consistently checking for bad
    parameters, ...)

    There are still some differences to call out, which should be
    resolved at part of the unification:

      1. RegalVao implements Vertex Array Objects assuming the back-end
         does not. If vertex array state were unified, it would still
         perform this function.
      2. RegalIff includes some code to handle the having only
         8 vertex attributes, and also maps the fixed-function
         attributes into generic attribute entries. The mapping seemed
         wrong, so I did not do it, but I'm sure the 8 vertex attribute
         restriction is important for some platform. Integrating the
         state tracking done by this module would also seem like the
         most work involved in a unification effort.
      3. RegalPpc implements state query functionality, which RegalPpca
         does not.
Regal::Emu::Ppca touch-ups

Refresh VC10 projects.
Resolve MS compilation warnings and errors.
Add GL_NV_framebuffer_blit extension support.

Moving regal emulation objects into Regal::Emu namespace.
PPCA fixed attrib vertex array buffer bindings

I neglected to properly track the array buffer binding per fixed vertex
array client state.

Add in the missing functionality, along with related tests to cover the
change.