alecgl_old/sfml20test/ShaderManager.h

37 lines
558 B
C
Raw Permalink Normal View History

2015-04-08 21:35:21 +00:00
#ifndef SHADERMANH
#define SHADERMANH
#define SFML_STATIC
#define GLEW_STATIC
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <String>
#include <map>
#include <stdarg.h>
namespace agl {
class ShaderProgram {
GLuint program;
char *err;
std::map<std::string, GLint> uniformMap;
char* readFile(char*);
public:
ShaderProgram() { program = 0; };
int initProgram(int, ...);
void StartProgram();
void EndProgram();
GLint getVariable(char *varname);
char* getLastError();
GLuint getProgram();
~ShaderProgram();
};
}
#endif