1 #ifndef MSP_GL_SHADER_H_
2 #define MSP_GL_SHADER_H_
4 #include <msp/core/attributes.h>
12 A single shader stage. Shaders must be attached to a Program to be used.
14 This class can't be instantiated directly. Use one of the VertexShader and
15 FragmentShader classes to create Shaders.
25 Shader(GLenum t, const std::string &);
31 void source(unsigned count, const char **str, const int *len);
32 void source(const std::string &str);
33 void source(const char *str, int len);
35 unsigned get_id() const { return id; }
37 bool is_compiled() const { return compiled; }
38 std::string get_info_log() const;
42 class VertexShader: public Shader
46 VertexShader(const std::string &);
50 class FragmentShader: public Shader
54 FragmentShader(const std::string &);
58 class GeometryShader: public Shader
62 GeometryShader(const std::string &);