29 lines
No EOL
655 B
C++
29 lines
No EOL
655 B
C++
#ifndef __SHADER_H__
|
|
#define __SHADER_H__
|
|
|
|
#include <GL/glew.h>
|
|
#include <SDL2/SDL.h>
|
|
#include <SDL2/SDL_opengl.h>
|
|
#include <SDL2/SDL_video.h>
|
|
#include <string>
|
|
|
|
class shader{
|
|
public:
|
|
GLuint fragmentShader;
|
|
GLuint vertexShader;
|
|
GLuint geometryShader;
|
|
bool geoshd=false;
|
|
GLuint shaderProgram;
|
|
//links the shader and creates the shaderprogram
|
|
GLint getInputId(std::string name);
|
|
GLint getUniformId(std::string name);
|
|
GLint getOutputId(std::string name);
|
|
//void setAttribute(std::string name);
|
|
void setAttribute(GLuint name);
|
|
void attatchshader();
|
|
void linkshader();
|
|
void use();
|
|
private:
|
|
};
|
|
|
|
#endif |