X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fshader.cpp;h=0c356f5f460826f7e97877881d15f35ba3db36f0;hp=17bf3fad3196ad08b735669bda32f72bf2212a92;hb=6eb1cf196dbe5a2c39b29b49b6901ae7d2b4e803;hpb=e3561c5c4d0b2caf00a0e50ce85c11a9fb62aa72 diff --git a/source/shader.cpp b/source/shader.cpp index 17bf3fad..0c356f5f 100644 --- a/source/shader.cpp +++ b/source/shader.cpp @@ -1,7 +1,8 @@ #include +#include #include #include -#include +#include #include "error.h" #include "misc.h" #include "shader.h" @@ -33,7 +34,7 @@ void Shader::init(GLenum t) else if(t==GL_VERTEX_SHADER) static Require _req(ARB_vertex_shader); else if(t==GL_GEOMETRY_SHADER) - static Require _req(EXT_geometry_shader4); + static Require _req(ARB_geometry_shader4); id = glCreateShader(t); } @@ -64,6 +65,12 @@ void Shader::compile() compiled = get_shader_i(id, GL_COMPILE_STATUS); if(!compiled) throw compile_error(get_info_log()); + +#ifdef DEBUG + string info_log = get_info_log(); + if(!info_log.empty()) + IO::print("Shader compile info log:\n%s", info_log); +#endif } string Shader::get_info_log() const