#ifndef GLSHADER_SHADER_HPP #define GLSHADER_SHADER_HPP #include #include #include class Shader { public: Shader(std::vector paths, std::string name = ""); Shader(Shader &&); Shader(Shader const &); Shader & operator=(Shader &&); Shader & operator=(Shader const &); ~Shader(); Shader & use(); Shader & validate(); private: void new_(); void delete_(); void ensure_current_( std::string const & operation, std::string const & name = "" ); GLuint program_; std::vector paths_; std::string name_; }; #ifdef NDEBUG #define GLSHADER_ENSURE_CURRENT(OPERATION, NAME) #else #define GLSHADER_ENSURE_CURRENT(OPERATION, NAME) \ ensure_current_(OPERATION, NAME) #endif #endif // GLSHADER_SHADER_HPP