#ifndef GLTEST_SHADERPROGRAM_H
#define GLTEST_SHADERPROGRAM_H


#include <GL/glew.h>
#include <string>

class ShaderProgram {
private:
	GLuint _program;
	GLuint  _vertexShader;
	GLuint  _fragmentShader;
	char* _vertexShaderText;
	char* _fragmentShaderText;

public:
	ShaderProgram(const char* vertexShaderPath, const char* fragmentShaderPath);
	void use() const;
	operator GLuint() const;
	~ShaderProgram();

private:
	void logCompileError(GLuint shader);
};


#endif //GLTEST_SHADERPROGRAM_H
