aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Graphics/Shader.h')
-rw-r--r--src/libjin/Graphics/Shader.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/libjin/Graphics/Shader.h b/src/libjin/Graphics/Shader.h
deleted file mode 100644
index 6339883..0000000
--- a/src/libjin/Graphics/Shader.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __LIBJIN_JSL_H
-#define __LIBJIN_JSL_H
-#include "../jin_configuration.h"
-#if LIBJIN_MODULES_RENDER
-
-#include <string>
-#include <map>
-#include "color.h"
-#include "texture.h"
-#include "canvas.h"
-#include "../3rdparty/GLee/GLee.h"
-#include "Shaders/base.shader.h"
-
-namespace jin
-{
- namespace graphics
- {
-
- class Shader
- {
- public:
- static Shader* createShader(const std::string& program);
- static inline Shader* getCurrentShader() { return currentShader; }
- static void unuse();
-
- virtual ~Shader();
-
- void use();
- void sendFloat(const char* name, float number);
- void sendTexture(const char* name, const Texture* image);
- void sendInt(const char* name, int value);
- void sendVec2(const char* name, float x, float y);
- void sendVec3(const char* name, float x, float y, float z);
- void sendVec4(const char* name, float x, float y, float z, float w);
- void sendCanvas(const char* name, const Canvas* canvas);
- void sendColor(const char* name, const Color* col);
- void sendMatrix4(const char* name, const math::Matrix* mat4);
-
- void bindVertexPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers);
- void bindUVPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers);
-
- protected:
- static Shader* currentShader;
-
- GLint claimTextureUnit(const std::string& name);
- Shader(const std::string& program);
- bool compile(const std::string& program);
-
- GLuint pid;
- GLint currentTextureUnit;
- std::map<std::string, GLint> textureUnits;
-
- };
-
- } // graphics
-} // jin
-
-#endif // LIBJIN_MODULES_RENDER
-#endif // __LIBJIN_JSL_H \ No newline at end of file