]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/renderer.cpp
Support compute shaders and compute operations
[libs/gl.git] / source / render / renderer.cpp
index 828efd70ab0695dfc8773dd478061e0eb826aebf..ce0b3447b2b02a43df1029db2b358cd4f8aa2cb8 100644 (file)
@@ -296,6 +296,14 @@ void Renderer::draw_instanced(const Batch &batch, unsigned count)
        commands.draw_instanced(batch, count);
 }
 
+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(Framebuffer &target)
 {
        const State &state = get_state();