diff --git a/src/gltk/program.d b/src/gltk/program.d index 211226d..14d9879 100644 --- a/src/gltk/program.d +++ b/src/gltk/program.d @@ -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); diff --git a/src/jes/gui/package.d b/src/jes/gui/package.d index bf67693..3ddd848 100644 --- a/src/jes/gui/package.d +++ b/src/jes/gui/package.d @@ -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");