Skip to content

Commit b0acec5

Browse files
committed
use TriangleStrip
1 parent 38e5ebb commit b0acec5

File tree

1 file changed

+5
-2
lines changed
  • sugarloaf/src/components/rich_text

1 file changed

+5
-2
lines changed

sugarloaf/src/components/rich_text/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_hash::FxHashMap;
1616
use std::{borrow::Cow, mem};
1717
use text::{Glyph, TextRunStyle};
1818
use wgpu::util::DeviceExt;
19-
use wgpu::{Texture, PrimitiveState};
19+
use wgpu::Texture;
2020

2121
// Note: currently it's using Indexed drawing instead of Instance drawing could be worth to
2222
// evaluate if would make sense move to instance drawing instead
@@ -246,7 +246,10 @@ impl RichTextBrush {
246246
write_mask: wgpu::ColorWrites::ALL,
247247
})],
248248
}),
249-
primitive: PrimitiveState::default(),
249+
primitive: wgpu::PrimitiveState {
250+
topology: wgpu::PrimitiveTopology::TriangleStrip,
251+
..Default::default()
252+
},
250253
depth_stencil: None,
251254
multisample: wgpu::MultisampleState::default(),
252255
multiview: None,

0 commit comments

Comments
 (0)