void AnimatedObject::setup_render(Renderer &renderer, Tag) const
{
- renderer.transform(matrix);
+ renderer.set_matrix(matrix);
renderer.add_shader_data(shdata);
}
void ObjectInstance::setup_render(Renderer &renderer, Tag) const
{
- renderer.transform(matrix);
+ renderer.set_matrix(matrix);
}
unsigned ObjectInstance::get_level_of_detail(const Renderer &renderer) const
{
QueryPool::Activate activate_query(renderer, queries, i-occluded_cache.begin());
Renderer::Push push2(renderer);
- renderer.transform(Matrix(*i->renderable->get_matrix())
+ renderer.set_matrix(Matrix(*i->renderable->get_matrix())
.translate(i->bounding_sphere->get_center())
.scale(i->bounding_sphere->get_radius()));
bounding_mesh.draw(renderer);
changed |= MATRIX;
}
-void Renderer::transform(const Matrix &matrix)
-{
- get_state().model_matrix *= matrix;
- changed |= MATRIX;
-}
-
void Renderer::set_framebuffer(const Framebuffer *f)
{
get_state().framebuffer = f;
/** Replaces the Renderer's model matrix. */
void set_matrix(const Matrix &);
- /** Applies a transform to the Renderer's model matrix. */
- void transform(const Matrix &);
-
/** Returns the current model matrix. */
const Matrix &get_matrix() const { return get_state().model_matrix; }