+ init(t);
+}
+
+Shader::Shader(ShaderType t, const string &src)
+{
+ init(t);
+
+ source(src);
+ compile();
+}
+
+void Shader::init(ShaderType t)
+{
+ compiled = false;
+
+ if(t==FRAGMENT_SHADER)
+ static Require _req(ARB_fragment_shader);
+ else if(t==VERTEX_SHADER)
+ static Require _req(ARB_vertex_shader);
+
+ id = glCreateShader(t);