2018-09-05 06:49:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-09-05 15:47:09 +00:00
|
|
|
#include "stdafx.h"
|
2018-09-05 06:49:02 +00:00
|
|
|
|
2018-09-05 15:47:09 +00:00
|
|
|
#include "Exception.h"
|
2018-09-05 06:49:02 +00:00
|
|
|
|
|
|
|
#include "Shader.h"
|
|
|
|
|
|
|
|
class ShaderProgram
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ShaderProgram();
|
|
|
|
virtual ~ShaderProgram();
|
|
|
|
|
2018-09-05 20:26:50 +00:00
|
|
|
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:
|
2018-09-05 15:47:09 +00:00
|
|
|
GLuint m_program = 0;
|
2018-09-05 06:49:02 +00:00
|
|
|
};
|