ShInitialize/ShFinalize is designed to be called once per process, or it would crash at random locations. I changed ShFinalize() to properly cleanup and reset global variables so that they can be called multiple times. I think that the compiler setup is much more complicated than it needs to be. It unnecessarily uses global variables. A custom pool allocator is overkill too.
Review URL: http://codereview.appspot.com/1238045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@316 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Shader.cpp b/src/libGLESv2/Shader.cpp
index 75eba4a..10a4b75 100644
--- a/src/libGLESv2/Shader.cpp
+++ b/src/libGLESv2/Shader.cpp
@@ -215,6 +215,8 @@
mFragmentCompiler = NULL;
mVertexCompiler = NULL;
+
+ ShFinalize();
}
void Shader::parseVaryings()