Shader::~Shader()
{
- glDeleteShader(id);
+ if(id)
+ glDeleteShader(id);
}
void Shader::source(unsigned count, const char **str, const int *len)
#endif
}
+unsigned Shader::steal_id()
+{
+ unsigned result = id;
+ id = 0;
+ return result;
+}
+
string Shader::get_info_log() const
{
GLsizei len = get_shader_i(id, GL_INFO_LOG_LENGTH);