summaryrefslogtreecommitdiff
path: root/gfx/gl/programHandle.cpp
blob: bfe06f2c907673e23c6f68858f248d514b74cb5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "programHandle.h"
#include "glSource.h"

ProgramHandleBase::ProgramHandleBase(GLuint vs, GLuint fs) : viewProjection_uniform {}, model_uniform {}
{
	glAttachShader(m_program, vs);
	glAttachShader(m_program, fs);

	glLinkProgram(m_program);
	GLsource::CheckShaderError(m_program, GL_LINK_STATUS, true, "Error linking shader program");

	glValidateProgram(m_program);
	GLsource::CheckShaderError(m_program, GL_VALIDATE_STATUS, true, "Invalid shader program");
}