summaryrefslogtreecommitdiffstats
path: root/Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h')
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h45
1 files changed, 27 insertions, 18 deletions
diff --git a/Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h b/Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h
index 5eaa053..9c7c0df 100644
--- a/Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h
+++ b/Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -57,9 +57,12 @@ class Shader
int getInfoLogLength() const;
void getInfoLog(GLsizei bufSize, GLsizei *length, char *infoLog);
int getSourceLength() const;
- void getSource(GLsizei bufSize, GLsizei *length, char *source);
+ void getSource(GLsizei bufSize, GLsizei *length, char *buffer);
+ int getTranslatedSourceLength() const;
+ void getTranslatedSource(GLsizei bufSize, GLsizei *length, char *buffer);
virtual void compile() = 0;
+ virtual void uncompile();
bool isCompiled();
const char *getHLSL();
@@ -72,15 +75,30 @@ class Shader
static void releaseCompiler();
protected:
- DISALLOW_COPY_AND_ASSIGN(Shader);
-
void parseVaryings();
void compileToHLSL(void *compiler);
+ void getSourceImpl(char *source, GLsizei bufSize, GLsizei *length, char *buffer);
+
static GLenum parseType(const std::string &type);
static bool compareVarying(const Varying &x, const Varying &y);
+ VaryingList mVaryings;
+
+ bool mUsesFragCoord;
+ bool mUsesFrontFacing;
+ bool mUsesPointSize;
+ bool mUsesPointCoord;
+
+ static void *mFragmentCompiler;
+ static void *mVertexCompiler;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Shader);
+
+ void initializeCompiler();
+
const GLuint mHandle;
unsigned int mRefCount; // Number of program objects this shader is attached to
bool mDeleteStatus; // Flag to indicate that the shader can be deleted when no longer in use
@@ -89,17 +107,7 @@ class Shader
char *mHlsl;
char *mInfoLog;
- VaryingList varyings;
-
- bool mUsesFragCoord;
- bool mUsesFrontFacing;
- bool mUsesPointSize;
- bool mUsesPointCoord;
-
ResourceManager *mResourceManager;
-
- static void *mFragmentCompiler;
- static void *mVertexCompiler;
};
struct Attribute
@@ -127,8 +135,9 @@ class VertexShader : public Shader
~VertexShader();
- GLenum getType();
- void compile();
+ virtual GLenum getType();
+ virtual void compile();
+ virtual void uncompile();
int getSemanticIndex(const std::string &attributeName);
private:
@@ -146,8 +155,8 @@ class FragmentShader : public Shader
~FragmentShader();
- GLenum getType();
- void compile();
+ virtual GLenum getType();
+ virtual void compile();
private:
DISALLOW_COPY_AND_ASSIGN(FragmentShader);