+
+ if(current_state->pipeline_key!=old_pipeline)
+ changed |= PIPELINE_KEY;
+}
+
+Renderer::State &Renderer::get_state() const
+{
+#ifdef DEBUG
+ if(!current_state)
+ throw invalid_operation("Renderer::get_state");
+#endif
+ return *current_state;
+}
+
+void Renderer::set_pipeline_key(uintptr_t key)
+{
+ State &state = get_state();
+ if(key!=state.pipeline_key)
+ {
+ state.pipeline_key = key;
+ changed |= PIPELINE_KEY;
+ }
+}
+
+void Renderer::set_camera(const Camera &c)
+{
+ get_state().camera = &c;
+ set_matrix(Matrix());