21 lines
500 B
C++
21 lines
500 B
C++
#pragma once
|
|
#include <string>
|
|
#include <GL/glew.h>
|
|
#include "defines.hpp"
|
|
|
|
struct Shader {
|
|
Shader(const char* vertexShaderFileName, const char* fragmentShaderFileName);
|
|
virtual ~Shader();
|
|
|
|
void bind();
|
|
void unbind();
|
|
|
|
GLuint getShaderId();
|
|
|
|
private:
|
|
GLuint compile(std::string shaderSource, GLenum shaderType);
|
|
std::string parse(const char* filename);
|
|
GLuint createShader(const char* vertexShaderFileName, const char* fragmentShaderFileName);
|
|
|
|
GLuint shaderId;
|
|
}; |