Consider pending geometry in wgpu::Layer

This commit is contained in:
Héctor Ramón Jiménez 2025-08-18 20:04:55 +02:00
parent 47f0d5bae4
commit ab4fdaf91d
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -301,7 +301,7 @@ impl graphics::Layer for Layer {
return 0;
}
if !self.triangles.is_empty() {
if !self.triangles.is_empty() || !self.pending_meshes.is_empty() {
return 1;
}
@ -313,7 +313,7 @@ impl graphics::Layer for Layer {
return 3;
}
if !self.text.is_empty() {
if !self.text.is_empty() || !self.pending_text.is_empty() {
return 4;
}
@ -321,7 +321,7 @@ impl graphics::Layer for Layer {
}
fn end(&self) -> usize {
if !self.text.is_empty() {
if !self.text.is_empty() || !self.pending_text.is_empty() {
return 4;
}
@ -333,7 +333,7 @@ impl graphics::Layer for Layer {
return 2;
}
if !self.triangles.is_empty() {
if !self.triangles.is_empty() || !self.pending_meshes.is_empty() {
return 1;
}