Commit 536d7265 by Geoff Lang

Replaced the char pointers with std::strings in the Shader classes.

TRAC #23775 Author: Geoff Lang Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
parent 42359ca9
...@@ -72,18 +72,18 @@ class Shader ...@@ -72,18 +72,18 @@ class Shader
void deleteSource(); void deleteSource();
void setSource(GLsizei count, const char *const *string, const GLint *length); void setSource(GLsizei count, const char *const *string, const GLint *length);
int getInfoLogLength() const; int getInfoLogLength() const;
void getInfoLog(GLsizei bufSize, GLsizei *length, char *infoLog); void getInfoLog(GLsizei bufSize, GLsizei *length, char *infoLog) const;
int getSourceLength() const; int getSourceLength() const;
void getSource(GLsizei bufSize, GLsizei *length, char *buffer); void getSource(GLsizei bufSize, GLsizei *length, char *buffer) const;
int getTranslatedSourceLength() const; int getTranslatedSourceLength() const;
void getTranslatedSource(GLsizei bufSize, GLsizei *length, char *buffer); void getTranslatedSource(GLsizei bufSize, GLsizei *length, char *buffer) const;
const sh::ActiveUniforms &getUniforms(); const sh::ActiveUniforms &getUniforms() const;
const sh::ActiveInterfaceBlocks &getInterfaceBlocks(); const sh::ActiveInterfaceBlocks &getInterfaceBlocks() const;
virtual void compile() = 0; virtual void compile() = 0;
virtual void uncompile(); virtual void uncompile();
bool isCompiled(); bool isCompiled() const;
const char *getHLSL(); const std::string &getHLSL() const;
void addRef(); void addRef();
void release(); void release();
...@@ -100,7 +100,7 @@ class Shader ...@@ -100,7 +100,7 @@ class Shader
void compileToHLSL(void *compiler); void compileToHLSL(void *compiler);
void getSourceImpl(char *source, GLsizei bufSize, GLsizei *length, char *buffer); void getSourceImpl(const std::string &source, GLsizei bufSize, GLsizei *length, char *buffer) const;
static Interpolation parseInterpolation(const std::string &type); static Interpolation parseInterpolation(const std::string &type);
static GLenum parseType(const std::string &type); static GLenum parseType(const std::string &type);
...@@ -133,9 +133,9 @@ class Shader ...@@ -133,9 +133,9 @@ class Shader
unsigned int mRefCount; // Number of program objects this shader is attached to 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 bool mDeleteStatus; // Flag to indicate that the shader can be deleted when no longer in use
char *mSource; std::string mSource;
char *mHlsl; std::string mHlsl;
char *mInfoLog; std::string mInfoLog;
sh::ActiveUniforms mActiveUniforms; sh::ActiveUniforms mActiveUniforms;
sh::ActiveInterfaceBlocks mActiveInterfaceBlocks; sh::ActiveInterfaceBlocks mActiveInterfaceBlocks;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment