charcoal/OpenGLEngine/ShaderProgram.h

28 lines
343 B
C
Raw Permalink Normal View History

2018-09-05 06:49:02 +00:00
#pragma once
2018-10-10 21:44:15 +00:00
#include "deps.h"
2018-09-05 06:49:02 +00:00
#include "Exception.h"
2018-09-05 06:49:02 +00:00
#include "Shader.h"
2018-09-12 21:03:46 +00:00
namespace charcoal
2018-09-05 06:49:02 +00:00
{
2018-09-12 21:03:46 +00:00
class ShaderProgram
{
public:
ShaderProgram();
virtual ~ShaderProgram();
2018-09-05 06:49:02 +00:00
2018-09-12 21:03:46 +00:00
void use() const;
2018-09-05 06:49:02 +00:00
2018-09-12 21:03:46 +00:00
GLuint get_program() const;
2018-09-05 06:49:02 +00:00
2018-09-12 21:03:46 +00:00
protected:
void attach_shader(const Shader& shader);
void link();
2018-09-05 06:49:02 +00:00
2018-09-12 21:03:46 +00:00
private:
GLuint m_program = 0;
};
}