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/Program.h b/src/libGLESv2/Program.h
index 244731d..3adc9be 100644
--- a/src/libGLESv2/Program.h
+++ b/src/libGLESv2/Program.h
@@ -69,7 +69,7 @@
void bindAttributeLocation(GLuint index, const char *name);
void link();
- void setProgramBinary(ProgramBinary *programBinary);
+ void setProgramBinary(const void *binary, GLsizei length);
ProgramBinary *getProgramBinary();
int getInfoLogLength() const;
@@ -95,6 +95,8 @@
unsigned int getSerial() const;
+ GLint getProgramBinaryLength() const;
+
private:
DISALLOW_COPY_AND_ASSIGN(Program);