X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Frenderer.cpp;h=50d3887369a30cbcdf6b8b1f99e83ea33ca08a94;hb=94cadd1618f93239b1cb0acbd4f958257c035c98;hp=828efd70ab0695dfc8773dd478061e0eb826aebf;hpb=2a70fecfbbe8708be2bdaa75d222dd5a889a8ed3;p=libs%2Fgl.git diff --git a/source/render/renderer.cpp b/source/render/renderer.cpp index 828efd70..50d38873 100644 --- a/source/render/renderer.cpp +++ b/source/render/renderer.cpp @@ -296,21 +296,24 @@ void Renderer::draw_instanced(const Batch &batch, unsigned count) commands.draw_instanced(batch, count); } -void Renderer::resolve_multisample(Framebuffer &target) +void Renderer::dispatch(unsigned count_x, unsigned count_y, unsigned count_z) +{ + apply_state(); + PipelineState &ps = get_pipeline_state(); + commands.use_pipeline(&ps); + commands.dispatch(count_x, count_y, count_z); +} + +void Renderer::resolve_multisample() { const State &state = get_state(); if(!state.framebuffer) throw invalid_operation("Renderer::resolve_multisample"); - unsigned width = state.framebuffer->get_width(); - unsigned height = state.framebuffer->get_height(); - if(target.get_width()!=width || target.get_height()!=height) - throw incompatible_data("Renderer::resolve_multisample"); - apply_framebuffer(); commands.use_pipeline(&get_pipeline_state()); - commands.resolve_multisample(target); + commands.resolve_multisample(); } void Renderer::begin_query(const QueryPool &pool, unsigned index)