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)
void Renderer::clear(const ClearValue *values)
{
pipeline_state.set_framebuffer(state->framebuffer);
+ commands.use_pipeline(&pipeline_state);
commands.clear(values);
}
{
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);
}
-void Renderer::resolve_multisample(Framebuffer &target, BufferBits buffers)
+void Renderer::resolve_multisample(Framebuffer &target)
{
if(!state->framebuffer)
throw invalid_operation("Renderer::resolve_multisample");
throw incompatible_data("Renderer::resolve_multisample");
pipeline_state.set_framebuffer(state->framebuffer);
- commands.resolve_multisample(target, buffers);
+ commands.use_pipeline(&pipeline_state);
+ commands.resolve_multisample(target);
}
void Renderer::apply_state()