if(c)
set_camera(*c);
else
+ {
standard_shdata.uniform("projection_matrix", Matrix());
+ standard_shdata.uniform("eye_world_matrix", Matrix());
+ }
}
Renderer::~Renderer()
{
state->camera = &c;
standard_shdata.uniform("projection_matrix", state->camera->get_projection_matrix());
+ standard_shdata.uniform("eye_world_matrix", state->camera->get_view_matrix());
changed |= STANDARD_SHDATA|LEGACY_PROJECTION;
set_matrix(state->camera->get_view_matrix());
}
if(camera_changed)
{
if(state->camera)
+ {
standard_shdata.uniform("projection_matrix", state->camera->get_projection_matrix());
+ standard_shdata.uniform("eye_world_matrix", state->camera->get_view_matrix());
+ }
else
+ {
standard_shdata.uniform("projection_matrix", Matrix());
+ standard_shdata.uniform("eye_world_matrix", Matrix());
+ }
changed |= STANDARD_SHDATA|LEGACY_PROJECTION;
}
/* This actually should compare the relevant matrices rather than check for