From e87f3acff4a8481611ce09775c6d34a004fab686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sun, 26 Apr 2020 17:09:03 +0200 Subject: [PATCH] Render meshes after quads in `iced_wgpu` --- wgpu/src/renderer.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index 481b310c..ca9364c1 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -339,6 +339,18 @@ impl Renderer { ) { let bounds = layer.bounds * scale_factor; + if !layer.quads.is_empty() { + self.quad_pipeline.draw( + device, + encoder, + &layer.quads, + transformation, + scale_factor, + bounds, + target, + ); + } + if !layer.meshes.is_empty() { let scaled = transformation * Transformation::scale(scale_factor, scale_factor); @@ -355,18 +367,6 @@ impl Renderer { ); } - if !layer.quads.is_empty() { - self.quad_pipeline.draw( - device, - encoder, - &layer.quads, - transformation, - scale_factor, - bounds, - target, - ); - } - #[cfg(any(feature = "image", feature = "svg"))] { if !layer.images.is_empty() {