]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/renderer.cpp
Store primitive type in PipelineState
[libs/gl.git] / source / render / renderer.cpp
index 45ad120045397de5848e4cecfe1968f39e83433b..4fb2b0c79bc01dc8dcbf6fbc58b79aea98b0f441 100644 (file)
@@ -240,6 +240,7 @@ void Renderer::draw(const Batch &batch)
 {
        apply_state();
        batch.refresh();
+       pipeline_state.set_primitive_type(batch.get_type());
        commands.use_pipeline(&pipeline_state);
        commands.draw(batch);
 }
@@ -248,6 +249,7 @@ void Renderer::draw_instanced(const Batch &batch, unsigned count)
 {
        apply_state();
        batch.refresh();
+       pipeline_state.set_primitive_type(batch.get_type());
        commands.use_pipeline(&pipeline_state);
        commands.draw_instanced(batch, count);
 }