summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7b1a814)
Re-hashing the names every time takes enough time to show up in a
profile.
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
+const Tag Renderer::world_obj_matrix_tag("world_obj_matrix");
+const Tag Renderer::world_obj_normal_matrix_tag("world_obj_normal_matrix");
+
Renderer::Renderer():
placeholder_texture(Resources::get_global().get<Texture>("_placeholder.png"))
{
Renderer::Renderer():
placeholder_texture(Resources::get_global().get<Texture>("_placeholder.png"))
{
- standard_shdata.uniform("world_obj_matrix", state.model_matrix);
+ standard_shdata.uniform(world_obj_matrix_tag, state.model_matrix);
LinAl::SquareMatrix<float, 3> nm = state.model_matrix.block<3, 3>(0, 0);
nm = transpose(invert(nm));
LinAl::SquareMatrix<float, 3> nm = state.model_matrix.block<3, 3>(0, 0);
nm = transpose(invert(nm));
- standard_shdata.uniform("world_obj_normal_matrix", nm);
+ standard_shdata.uniform(world_obj_normal_matrix_tag, nm);
changed &= ~MATRIX;
shdata_changed = true;
}
changed &= ~MATRIX;
shdata_changed = true;
}
PipelineState *last_pipeline = 0;
Commands commands;
PipelineState *last_pipeline = 0;
Commands commands;
+ static const Tag world_obj_matrix_tag;
+ static const Tag world_obj_normal_matrix_tag;
+