X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogram.cpp;h=baeba9f5c33d1091da815f0d14d7f6be45807b3b;hb=49758ab622d2e8ed4b3a60d7b9afc4abd741300c;hp=9c95ee1730d522665fd78e63ed1124a8ab618556;hpb=2579be0c3bf50f060364b937e6b2446ea3547e4b;p=libs%2Fgl.git diff --git a/source/program.cpp b/source/program.cpp index 9c95ee17..baeba9f5 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -29,8 +29,7 @@ Program::Program(const ProgramBuilder::StandardFeatures &features) ProgramBuilder builder(features); builder.add_shaders(*this); - if(!features.transform) - link(); + link(); } Program::Program(const string &vert, const string &frag) @@ -89,6 +88,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);