mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-23 06:15:37 +00:00
34 lines
591 B
C++
34 lines
591 B
C++
#ifndef _GLSLSHADER_H_
|
|
#define _GLSLSHADER_H_
|
|
|
|
#include <GL/glew.h>
|
|
|
|
class GLSLShader {
|
|
|
|
public:
|
|
GLSLShader();
|
|
~GLSLShader();
|
|
|
|
bool LoadShaders(const char *vertexShader, const char *fragmentShader);
|
|
void UnloadShaders();
|
|
|
|
void EnableShader();
|
|
void DisableShader();
|
|
|
|
int GetUniformLocation(const char *str);
|
|
int GetAttributeLocation(const char *str);
|
|
|
|
int uniformLoc[64];
|
|
int attribLoc[16];
|
|
|
|
private:
|
|
|
|
void PrintShaderInfoLog(GLuint obj);
|
|
void PrintProgramInfoLog(GLuint obj);
|
|
|
|
GLuint m_program;
|
|
GLuint m_vShader;
|
|
GLuint m_fShader;
|
|
};
|
|
|
|
#endif |