+ 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 RequireExtension _ext("GL_ARB_fragment_program");
+ else if(t==VERTEX_SHADER)
+ static RequireExtension _ext("GL_ARB_vertex_program");
+
+ id=glCreateShaderObjectARB(t);