charcoal/OpenGLEngine/ShaderProgram.h

25 lines
309 B
C
Raw Normal View History

2018-09-05 06:49:02 +00:00
#pragma once
#include "stdafx.h"
2018-09-05 06:49:02 +00:00
#include "Exception.h"
2018-09-05 06:49:02 +00:00
#include "Shader.h"
class ShaderProgram
{
public:
ShaderProgram();
virtual ~ShaderProgram();
void use() const;
2018-09-05 06:49:02 +00:00
GLuint get_program() const;
protected:
void attach_shader(const Shader& shader);
void link();
private:
GLuint m_program = 0;
2018-09-05 06:49:02 +00:00
};