int getSourceLength() const;\r
void getSource(GLsizei bufSize, GLsizei *length, char *source);\r
\r
- virtual void compile() = 0;\r
+ void compile();\r
bool isCompiled();\r
\r
void addRef();\r
\r
protected:\r
static bool compilerInitialized;\r
- TranslatorASM *createCompiler(ShShaderType type);\r
+ TranslatorASM *createCompiler(GLenum shaderType);\r
void clear();\r
\r
static GLenum parseType(const std::string &type);\r
char *mInfoLog;\r
\r
private:\r
+ virtual void createShader() = 0;\r
+ virtual void deleteShader() = 0;\r
+\r
const GLuint mHandle;\r
unsigned int mRefCount; // Number of program objects this shader is attached to\r
bool mDeleteStatus; // Flag to indicate that the shader can be deleted when no longer in use\r
~VertexShader();\r
\r
virtual GLenum getType();\r
- virtual void compile();\r
int getSemanticIndex(const std::string &attributeName);\r
\r
virtual sw::Shader *getShader() const;\r
virtual sw::VertexShader *getVertexShader() const;\r
\r
private:\r
+ virtual void createShader();\r
+ virtual void deleteShader();\r
+\r
sw::VertexShader *vertexShader;\r
};\r
\r
~FragmentShader();\r
\r
virtual GLenum getType();\r
- virtual void compile();\r
\r
virtual sw::Shader *getShader() const;\r
virtual sw::PixelShader *getPixelShader() const;\r
\r
private:\r
+ virtual void createShader();\r
+ virtual void deleteShader();\r
+\r
sw::PixelShader *pixelShader;\r
};\r
}\r