Permalink
Browse files

Shader: Ugly hack to fix vertex shader loading, will fix this after t…

…he ld48
  • Loading branch information...
1 parent 45e6f1d commit 021cf3e10b107beaea45fe269b142ed83b8572bc @psde committed Apr 22, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 Shader/Shader.hpp
View
@@ -171,8 +171,8 @@ namespace GosuEx
program.vertex = glCreateShader(GL_VERTEX_SHADER);
if(vsfile != L"")
{
- temp = this->loadShaderFile(vsfile);
- const GLchar* vertexShader = temp.c_str();
+ std::string temp2 = this->loadShaderFile(vsfile);
+ const GLchar* vertexShader = temp2.c_str();
glShaderSource(program.vertex, 1, &vertexShader, NULL);
}else{
glShaderSource(program.vertex, 1, &ffVertexShader, NULL);
@@ -185,7 +185,7 @@ namespace GosuEx
GLchar log[32768];
glGetShaderInfoLog(program.vertex, 32768, NULL, log);
std::cout << log << std::endl;
- //throw std::runtime_error(log);
+ throw std::runtime_error(log);
}
glAttachShader(program.program, program.vertex);
@@ -200,7 +200,7 @@ namespace GosuEx
GLchar log[32768];
glGetShaderInfoLog(program.fragment, 32768, NULL, log);
std::cout << log << std::endl;
- //throw std::runtime_error(log);
+ throw std::runtime_error(log);
}
glAttachShader(program.program, program.fragment);

0 comments on commit 021cf3e

Please sign in to comment.