1 #ifndef MSP_GL_SHADER_H_
2 #define MSP_GL_SHADER_H_
11 A single shader stage. Shaders must be attached to a Program to be used.
13 This class can't be instantiated directly. Use one of the VertexShader and
14 FragmentShader classes to create Shaders.
24 Shader(GLenum t, const std::string &);
30 void source(unsigned count, const char **str, const int *len);
31 void source(const std::string &str);
32 void source(const char *str, int len);
34 unsigned get_id() const { return id; }
35 bool is_compiled() const { return compiled; }
36 std::string get_info_log() const;
40 class VertexShader: public Shader
44 VertexShader(const std::string &);
48 class FragmentShader: public Shader
52 FragmentShader(const std::string &);
56 class GeometryShader: public Shader
60 GeometryShader(const std::string &);