]> git.tdb.fi Git - libs/gl.git/blobdiff - source/shader.cpp
Add Uniform* classes to store uniform data of Programs
[libs/gl.git] / source / shader.cpp
index 45d56a16070c9fb9f50d892b3b6f17188877f8c5..3c01242650d3bd26009a0a57711e34dc4a0779f7 100644 (file)
@@ -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