diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 391120a12e..f427e9e209 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -156,6 +156,7 @@ void SHADER::SetParameter( int parameterNumber, float f0, float f1, float f2, fl glUniform4fv( parameterLocation[parameterNumber], 1, arr ); } + int SHADER::GetAttribute( std::string aAttributeName ) const { return glGetAttribLocation( programNumber, aAttributeName.c_str() ); @@ -226,7 +227,7 @@ std::string SHADER::ReadSource( const std::string& aShaderSourceName ) } -bool SHADER::loadShaderFromStringArray( SHADER_TYPE aShaderType, const char* const* aArray, +bool SHADER::loadShaderFromStringArray( SHADER_TYPE aShaderType, const char** aArray, size_t aSize ) { assert( !isShaderLinked ); @@ -246,7 +247,7 @@ bool SHADER::loadShaderFromStringArray( SHADER_TYPE aShaderType, const char* con programInfo( programNumber ); // Attach the sources - glShaderSource( shaderNumber, aSize, aArray, NULL ); + glShaderSource( shaderNumber, aSize, (const GLchar**) aArray, NULL ); programInfo( programNumber ); // Compile and attach shader to the program diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index 760122d680..7a15e49a2a 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -205,7 +205,7 @@ private: /** * @brief Compile vertex of fragment shader source code into the program. */ - bool loadShaderFromStringArray( SHADER_TYPE aShaderType, const char* const* aArray, + bool loadShaderFromStringArray( SHADER_TYPE aShaderType, const char** aArray, size_t aSize ); /**