- if(camera)
- {
- mtx_stack.load(camera->get_matrix());
- standard_shdata.uniform("projection_matrix", camera->get_projection_matrix());
- }
- else
- {
- mtx_stack.load(MatrixStack::modelview().top());
- standard_shdata.uniform("projection_matrix", MatrixStack::projection().top());
- }
+void Renderer::set_camera(const Camera &c)
+{
+ state->camera = &c;
+ standard_shdata.uniform("projection_matrix", state->camera->get_projection_matrix());
+ changed |= STANDARD_SHDATA|LEGACY_PROJECTION;
+ set_matrix(state->camera->get_view_matrix());