X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogrambuilder.cpp;h=4043fc4471648f6dec62d611c7cf07479548c545;hp=a24b5d565c6687dc3a614c1834fb1026d262d681;hb=8e9d872c2ba8dc633d29a673ba93adf38d262a5c;hpb=6e42e65cb070ef86ea748423a1c6e0a59a937958 diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index a24b5d56..4043fc44 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -3,6 +3,7 @@ #include "program.h" #include "programbuilder.h" #include "shader.h" +#include "vertexformat.h" using namespace std; @@ -182,6 +183,12 @@ void ProgramBuilder::add_shaders(Program &prog) const prog.attach_shader_owned(new VertexShader(create_source(resolved_vars, VERTEX))); prog.attach_shader_owned(new FragmentShader(create_source(resolved_vars, FRAGMENT))); + + if(features.normalmap) + { + prog.bind_attribute(get_component_type(TANGENT3), "tangent"); + prog.bind_attribute(get_component_type(BINORMAL3), "binormal"); + } } string ProgramBuilder::create_source(const list &variables, VariableScope scope) const