#include "TextShader.h" #include "Runtime.h" TextShader::TextShader() { std::string v_path = Runtime::find(Runtime::SHADER, "text.v"); std::string f_path = Runtime::find(Runtime::SHADER, "text.f"); m_program = glcxx::Program::create( glcxx::Shader::create_from_file(GL_VERTEX_SHADER, v_path.c_str()), glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, f_path.c_str()), "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"); }