/src/Shader.h
#ifndef _SHADER_H
#define _SHADER_H

#include <GLES2/gl2.h>

class Shader {
public:
	Shader();
	~Shader();

	void useProgram();
	void setProjection(GLfloat *matrix);
	void setTransform(GLfloat *matrix);
	void setTranslation(int x, int y);
	void resetTransform();
	void setPositions(int count, GLshort *vertices);
protected:
	GLuint vertexShader;
	GLuint fragmentShader;
	GLuint shaderProgram;

	GLfloat transform[4][4];

	GLuint uProjection;
	GLuint uTransform;
	GLuint aPosition;

	GLuint compileShader(const char *code, GLenum type);
	void linkProgram();
	void basicInit();
};

#endif //_SHADER_H