Made the API of shader translator library consistent.
- We recently started using OpenGL-type enums. This CL makes all old enums consistent with the new scheme.
- Renamed TBuiltInResource to ShBuiltInResources to have a consistent prefix
BUG=46
Review URL: http://codereview.appspot.com/2328041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@443 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp
index bab6423..c5eaf30 100644
--- a/src/compiler/ShaderLang.cpp
+++ b/src/compiler/ShaderLang.cpp
@@ -31,12 +31,12 @@
return static_cast<int>(maxLen) + 1;
}
-static void getVariableInfo(EShInfo varType,
+static void getVariableInfo(ShShaderInfo varType,
const ShHandle handle,
int index,
int* length,
int* size,
- EShDataType* type,
+ ShDataType* type,
char* name)
{
if (!handle || !size || !type || !name)
@@ -87,7 +87,7 @@
//
// Initialize built-in resources with minimum expected values.
//
-void ShInitBuiltInResource(TBuiltInResource* resources)
+void ShInitBuiltInResources(ShBuiltInResources* resources)
{
// Constants.
resources->MaxVertexAttribs = 8;
@@ -106,12 +106,13 @@
//
// Driver calls these to create and destroy compiler objects.
//
-ShHandle ShConstructCompiler(EShLanguage language, EShSpec spec, const TBuiltInResource* resources)
+ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
+ const ShBuiltInResources* resources)
{
if (!InitThread())
return 0;
- TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(language, spec));
+ TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(type, spec));
TCompiler* compiler = base->getAsCompiler();
if (compiler == 0)
return 0;
@@ -172,7 +173,7 @@
return success ? 1 : 0;
}
-void ShGetInfo(const ShHandle handle, EShInfo pname, int* params)
+void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params)
{
if (!handle || !params)
return;
@@ -242,7 +243,7 @@
int index,
int* length,
int* size,
- EShDataType* type,
+ ShDataType* type,
char* name)
{
getVariableInfo(SH_ACTIVE_ATTRIBUTES,
@@ -253,7 +254,7 @@
int index,
int* length,
int* size,
- EShDataType* type,
+ ShDataType* type,
char* name)
{
getVariableInfo(SH_ACTIVE_UNIFORMS,