]> git.tdb.fi Git - libs/gl.git/blobdiff - source/program.cpp
Add an overload of bind_attribute that takes a VertexComponent
[libs/gl.git] / source / program.cpp
index 9c95ee1730d522665fd78e63ed1124a8ab618556..50ebed22899d57fae6d21518fdce048084b7062b 100644 (file)
@@ -89,6 +89,11 @@ void Program::bind_attribute(unsigned index, const string &name)
        glBindAttribLocation(id, index, name.c_str());
 }
 
+void Program::bind_attribute(VertexComponent comp, const string &name)
+{
+       bind_attribute(get_component_type(comp), name);
+}
+
 void Program::bind_fragment_data(unsigned index, const string &name)
 {
        static Require _req(EXT_gpu_shader4);