Restore the explicit isLinked() method for Programs and fix link().

Trac #21270
Bug=351
Signed-off-by: Nicolas Capens

If link fails we still need to keep the failed binary around for information
such as number of active attributes, varyings, etc.
Thus we can no longer use the presence of a binary to tell us if we've successfully
linked a program object.



git-svn-id: https://angleproject.googlecode.com/svn/trunk@1241 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.h b/src/libGLESv2/Program.h
index 981dc67..b103b1c 100644
--- a/src/libGLESv2/Program.h
+++ b/src/libGLESv2/Program.h
@@ -69,6 +69,7 @@
     void bindAttributeLocation(GLuint index, const char *name);
 
     bool link();
+    bool isLinked();
     bool setProgramBinary(const void *binary, GLsizei length);
     ProgramBinary *getProgramBinary();
 
@@ -106,6 +107,7 @@
     AttributeBindings mAttributeBindings;
 
     ProgramBinary* mProgramBinary;
+    bool mLinked;
     bool mDeleteStatus;   // Flag to indicate that the program can be deleted when no longer in use
 
     unsigned int mRefCount;