Support for serializing a linked program to binary.

The format has a text section followed by a binary section. The binary section contains an image of the device caps and the two shader executables. The text section has everything else newline deliminated.

Ran WebGL conformance tests with temporary change to glLinkProgram that round trips all linked programs through glGetProgramBinary and glProgramBinary. No regressions.
Review URL: https://codereview.appspot.com/6295092

git-svn-id: https://angleproject.googlecode.com/svn/trunk@1199 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/ProgramBinary.h b/src/libGLESv2/ProgramBinary.h
index 1e9c5e2..8a587b9 100644
--- a/src/libGLESv2/ProgramBinary.h
+++ b/src/libGLESv2/ProgramBinary.h
@@ -10,6 +10,10 @@
 #ifndef LIBGLESV2_PROGRAM_BINARY_H_
 #define LIBGLESV2_PROGRAM_BINARY_H_
 
+#define GL_APICALL
+#include <gles2/gl2.h>
+#include <gles2/gl2ext.h>
+
 #include <d3dx9.h>
 #include <d3dcompiler.h>
 #include <string>
@@ -78,6 +82,10 @@
 // Struct used for correlating uniforms/elements of uniform arrays to handles
 struct UniformLocation
 {
+    UniformLocation()
+    {
+    }
+
     UniformLocation(const std::string &_name, unsigned int element, unsigned int index);
 
     std::string name;
@@ -128,6 +136,10 @@
     void dirtyAllUniforms();
     void applyUniforms();
 
+    bool load(InfoLog &infoLog, const void *binary, GLsizei length);
+    bool save(void* binary, GLsizei bufSize, GLsizei *length);
+    GLint getLength();
+
     bool link(InfoLog &infoLog, const AttributeBindings &attributeBindings, FragmentShader *fragmentShader, VertexShader *vertexShader);
     void getAttachedShaders(GLsizei maxCount, GLsizei *count, GLuint *shaders);
 
@@ -182,6 +194,8 @@
 
     struct Sampler
     {
+        Sampler();
+
         bool active;
         GLint logicalTextureUnit;
         TextureType textureType;