Avoiding temp variable reference to appease mac and fixing a warning

This commit is contained in:
Sam Cake 2017-04-15 01:06:01 -07:00
parent 038d01ce04
commit 2b97171061
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ namespace gl {
bool compileShader(GLenum shaderDomain, const std::string& shaderSource, const std::string& defines, GLuint &shaderObject, std::string& error);
#endif
GLuint compileProgram(const std::vector<GLuint>& glshaders, std::string& error = std::string());
GLuint compileProgram(const std::vector<GLuint>& glshaders, std::string& error);
}

View file

@ -199,7 +199,7 @@ public:
std::string error;
::gl::compileShader(GL_VERTEX_SHADER, vsSource, "", vertexShader, error);
::gl::compileShader(GL_FRAGMENT_SHADER, fsSource, "", fragmentShader, error);
_program = ::gl::compileProgram({ { vertexShader, fragmentShader } });
_program = ::gl::compileProgram({ { vertexShader, fragmentShader } }, error);
glDeleteShader(vertexShader);
glDeleteShader(fragmentShader);
qDebug() << "Rebuild proigram";