14 #include <boost/utility/string_ref.hpp>
15 #include <boost/noncopyable.hpp>
28 virtual const char *what()
const throw() {
return message.c_str();}
79 GLuint
CompileShader(GLenum shaderType, boost::string_ref shaderText);
89 GLuint
CompileShader(GLenum shaderType,
const std::vector<std::string> &shaderList);
116 GLuint
LinkProgram(GLuint shaderOne, GLuint shaderTwo);
119 GLuint
LinkProgram(GLuint program, GLuint shaderOne, GLuint shaderTwo);
135 GLuint
LinkProgram(boost::string_ref vertexShader, boost::string_ref fragmentShader);
138 GLuint
LinkProgram(GLuint program, boost::string_ref vertexShader, boost::string_ref fragmentShader);
155 GLuint
LinkProgram(GLuint shader,
bool isSeparable =
false);
239 swap(m_shader, other.m_shader);
243 operator GLuint()
const {
return m_shader;}
249 m_shader = newShader;
262 GLuint shaderName = m_shader;
302 swap(m_program, other.m_program);
306 operator GLuint ()
const {
return m_program;}
312 m_program = newProgram;
325 GLuint programName = m_program;
336 inline void swap(UniqueShader &lhs, UniqueShader &rhs) {lhs.swap(rhs);}
337 inline void swap(UniqueProgram &lhs, UniqueProgram &rhs) {lhs.swap(rhs);}
342 #endif //SHADER_UTIL_H