namespace Msp {
namespace GL {
-Shader::Shader(ShaderType t)
+Shader::Shader(ShaderType t):
+ id(glCreateShader(t)),
+ compiled(false)
+{ }
+
+Shader::Shader(ShaderType t, const string &src):
+ id(glCreateShader(t)),
+ compiled(false)
{
- id=glCreateShader(t);
+ source(src);
+ compile();
}
Shader::~Shader()