specify vertex attribute position for rect shader "color" attribute

This commit is contained in:
Josh Holtrop 2018-01-24 09:49:17 -05:00
parent 6df412b6c2
commit 35f1eee2a7

View File

@ -5,7 +5,8 @@ RectShader::RectShader()
m_program = glcxx::Program::create(
glcxx::Shader::create_from_file(GL_VERTEX_SHADER, "rect.v.glsl"),
glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, "rect.f.glsl"),
"coords", 0);
"coords", 0,
"color", 1);
m_uniforms.viewport_size = m_program->get_uniform_location("viewport_size");
m_uniforms.position = m_program->get_uniform_location("position");