15 lines
565 B
C++
15 lines
565 B
C++
#include "TextShader.h"
|
|
|
|
TextShader::TextShader()
|
|
{
|
|
m_program = glcxx::Program::create(
|
|
glcxx::Shader::create_from_file(GL_VERTEX_SHADER, "text.v.glsl"),
|
|
glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, "text.f.glsl"),
|
|
"coords", 0);
|
|
|
|
m_uniforms.viewport_size = m_program->get_uniform_location("viewport_size");
|
|
m_uniforms.texture = m_program->get_uniform_location("texture");
|
|
m_uniforms.color = m_program->get_uniform_location("color");
|
|
m_uniforms.position = m_program->get_uniform_location("position");
|
|
}
|