Move VAO, VBO in classes
This commit is contained in:
24
ShaderProgram.h
Normal file
24
ShaderProgram.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <string>
|
||||
|
||||
class ShaderProgram {
|
||||
|
||||
public:
|
||||
|
||||
ShaderProgram(const char* vertexShaderFilename, const char* framentShaderFilename);
|
||||
~ShaderProgram();
|
||||
|
||||
void bind();
|
||||
void unbind();
|
||||
|
||||
private:
|
||||
|
||||
std::string parse(const char* filename);
|
||||
GLuint compile(std::string shaderSource, GLenum type);
|
||||
GLuint createShader(const char* vertexShaderFilename, const char* framentShaderFilename);
|
||||
|
||||
GLuint shaderProgramId;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user