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/ShHandle.h b/src/compiler/ShHandle.h
index 514eb59..e23f1a3 100644
--- a/src/compiler/ShHandle.h
+++ b/src/compiler/ShHandle.h
@@ -39,11 +39,11 @@
//
class TCompiler : public TShHandleBase {
public:
- TCompiler(EShLanguage l, EShSpec s) : language(l), spec(s) {}
- virtual ~TCompiler() {}
+ TCompiler(ShShaderType type, ShShaderSpec spec);
+ virtual ~TCompiler();
virtual TCompiler* getAsCompiler() { return this; }
- bool Init(const TBuiltInResource& resources);
+ bool Init(const ShBuiltInResources& resources);
bool compile(const char* const shaderStrings[],
const int numStrings,
int compileOptions);
@@ -55,7 +55,7 @@
protected:
// Initialize symbol-table with built-in symbols.
- bool InitBuiltInSymbolTable(const TBuiltInResource& resources);
+ bool InitBuiltInSymbolTable(const ShBuiltInResources& resources);
// Clears the results from the previous compilation.
void clearResults();
// Collect info for all attribs and uniforms.
@@ -64,8 +64,8 @@
virtual void translate(TIntermNode* root) = 0;
private:
- EShLanguage language;
- EShSpec spec;
+ ShShaderType shaderType;
+ ShShaderSpec shaderSpec;
// Built-in symbol table for the given language, spec, and resources.
// It is preserved from compile-to-compile.
@@ -88,7 +88,7 @@
// destroy the machine dependent objects, which contain the
// above machine independent information.
//
-TCompiler* ConstructCompiler(EShLanguage, EShSpec);
+TCompiler* ConstructCompiler(ShShaderType type, ShShaderSpec spec);
void DeleteCompiler(TCompiler*);
#endif // _SHHANDLE_INCLUDED_