--- /dev/null
+extension EXT_geometry_shader4
{
add("attribute", &Loader::attribute);
add("fragment_shader", &Loader::fragment_shader);
+ add("geometry_shader", &Loader::geometry_shader);
add("standard", &Loader::standard);
add("vertex_shader", &Loader::vertex_shader);
}
obj.attach_shader_owned(new FragmentShader(src));
}
+void Program::Loader::geometry_shader(const string &src)
+{
+ obj.attach_shader_owned(new GeometryShader(src));
+}
+
void Program::Loader::standard()
{
ProgramBuilder::StandardFeatures feat;
void attribute(unsigned, const std::string &);
void fragment_shader(const std::string &);
+ void geometry_shader(const std::string &);
void standard();
void vertex_shader(const std::string &);
};
#include <msp/gl/extensions/arb_fragment_shader.h>
#include <msp/gl/extensions/arb_shader_objects.h>
#include <msp/gl/extensions/arb_vertex_shader.h>
+#include <msp/gl/extensions/ext_geometry_shader4.h>
#include "error.h"
#include "misc.h"
#include "shader.h"
static Require _req(ARB_fragment_shader);
else if(t==GL_VERTEX_SHADER)
static Require _req(ARB_vertex_shader);
+ else if(t==GL_GEOMETRY_SHADER)
+ static Require _req(EXT_geometry_shader4);
id = glCreateShader(t);
}
Shader(GL_FRAGMENT_SHADER, src)
{ }
+
+GeometryShader::GeometryShader():
+ Shader(GL_GEOMETRY_SHADER)
+{ }
+
+GeometryShader::GeometryShader(const string &src):
+ Shader(GL_GEOMETRY_SHADER, src)
+{ }
+
} // namespace GL
} // namespace Msp
FragmentShader(const std::string &);
};
+
+class GeometryShader: public Shader
+{
+public:
+ GeometryShader();
+ GeometryShader(const std::string &);
+};
+
} // namespace GL
} // namespace Msp