shdata_stack.reserve(32);
state = &state_stack.back();
add_shader_data(standard_shdata);
- commands.use_pipeline(pipeline_state);
}
Renderer::~Renderer()
add_shader_data(standard_shdata);
excluded.clear();
- PipelineState::clear();
+ commands.use_pipeline(0);
}
void Renderer::exclude(const Renderable &renderable)
renderable.render(*this, tag);
}
-void Renderer::clear()
-{
- clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT|STENCIL_BUFFER_BIT);
-}
-
-void Renderer::clear(BufferBits buffers)
+void Renderer::clear(const ClearValue *values)
{
pipeline_state.set_framebuffer(state->framebuffer);
- commands.clear(buffers);
+ commands.use_pipeline(&pipeline_state);
+ commands.clear(values);
}
void Renderer::draw(const Batch &batch)
{
apply_state();
batch.refresh();
+ commands.use_pipeline(&pipeline_state);
commands.draw(batch);
}
{
apply_state();
batch.refresh();
+ commands.use_pipeline(&pipeline_state);
commands.draw_instanced(batch, count);
}
throw incompatible_data("Renderer::resolve_multisample");
pipeline_state.set_framebuffer(state->framebuffer);
+ commands.use_pipeline(&pipeline_state);
commands.resolve_multisample(target, buffers);
}