add gltk.Program.bind_attrib_location()
This commit is contained in:
parent
858ce9f7b1
commit
b16d6fa43f
@ -26,6 +26,11 @@ class Program
|
||||
glAttachShader(m_id, shader.id);
|
||||
}
|
||||
|
||||
void bind_attrib_location(uint index, string name)
|
||||
{
|
||||
glBindAttribLocation(m_id, index, name.toStringz());
|
||||
}
|
||||
|
||||
void link() const
|
||||
{
|
||||
glLinkProgram(m_id);
|
||||
|
@ -50,7 +50,7 @@ class Gui
|
||||
m_text_program = new gltk.Program();
|
||||
m_text_program.attach_shader(v_shader);
|
||||
m_text_program.attach_shader(f_shader);
|
||||
glBindAttribLocation(m_text_program.id, 0, "coords");
|
||||
m_text_program.bind_attrib_location(0u, "coords");
|
||||
m_text_program.link();
|
||||
m_viewport_size = m_text_program.get_uniform_location("viewport_size");
|
||||
m_texture = m_text_program.get_uniform_location("texture");
|
||||
|
Loading…
x
Reference in New Issue
Block a user