#include "program.h"
#include "programbuilder.h"
#include "shader.h"
+#include "vertexformat.h"
using namespace std;
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<ShaderVariable *> &variables, VariableScope scope) const