X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fshader.cpp;h=3c01242650d3bd26009a0a57711e34dc4a0779f7;hp=45d56a16070c9fb9f50d892b3b6f17188877f8c5;hb=85e83ace47e5a9a8ae7263886255dd81afc69278;hpb=224c40efa231c85b61da772a6f58c067d7b579b3 diff --git a/source/shader.cpp b/source/shader.cpp index 45d56a16..3c012426 100644 --- a/source/shader.cpp +++ b/source/shader.cpp @@ -6,6 +6,7 @@ Distributed under the LGPL */ #include "arb_shader_objects.h" +#include "except.h" #include "extension.h" #include "shader.h" @@ -59,11 +60,11 @@ void Shader::source(const char *str, int len) source(1, &str, &len); } -bool Shader::compile() +void Shader::compile() { glCompileShaderARB(id); - compiled=get_param(GL_COMPILE_STATUS); - return compiled; + if(!(compiled=get_param(GL_COMPILE_STATUS))) + throw CompileError(get_info_log()); } int Shader::get_param(GLenum param) const