#ifndef OPENGL_SHADER_H
#define OPENGL_SHADER_H

#include <string>
#include <epoxy/gl.h>
#include <glm/glm.hpp>

class OpenGlShaderProgram
{
	public:
		OpenGlShaderProgram(std::string vertex_file, std::string geometry_file, std::string fragment_file);
		OpenGlShaderProgram(const OpenGlShaderProgram &) = delete;
		OpenGlShaderProgram(const OpenGlShaderProgram &&) = delete;
		~OpenGlShaderProgram();
		int compile();
		void unload();
		int use();
		int getUniformLoc(const std::string &uniform);
		void setUniformFloat(const std::string &uniform, float value);
		void setUniformInt(const std::string &uniform, int value);
		void setUniformVec2(const std::string &uniform, float *vector);
		void setUniformMat4(const std::string &uniform, const glm::mat4 &matrix);
		void setUniformVec4(const std::string &uniform, const glm::vec4 &vector);
	private:
		bool compiled;
		GLuint shader_program;
		std::string vertex_file;
		std::string geometry_file;
		std::string fragment_file;
};

#endif // OPENGL_SHADER_H
