00001
00002 #pragma once
00003
00004 #ifndef SHADERS_H
00005 #define SHADERS_H
00006
00007
00008 #include "common.h"
00009
00013 class Shaders
00014 {
00015 public:
00016 Shaders();
00017 ~Shaders();
00018 void load();
00019 void activate();
00020 void deactivate();
00021 void uploadTexture(const char* name, GLint textureUnit);
00022 void uploadUniformInt(const char* name, int value);
00023 void uploadUniformFloat(const char* name, float value);
00024
00025 private:
00027 GLuint programShader;
00029 GLuint fragmentShader;
00031 GLuint vertexShader;
00032
00033 void getShadersLog(GLuint shader);
00034
00035 };
00036 #endif