Use strongly-typed OverlayID instead of usize

This commit is contained in:
Aleksander
2024-10-17 20:56:45 +02:00
committed by galister
parent 022ae53aea
commit 9dbd1f994e
6 changed files with 39 additions and 34 deletions

View File

@@ -21,7 +21,7 @@ use super::{
CompositionLayer, XrState,
};
static AUTO_INCREMENT: AtomicUsize = AtomicUsize::new(1);
static LINE_AUTO_INCREMENT: AtomicUsize = AtomicUsize::new(1);
pub(super) const LINE_WIDTH: f32 = 0.002;
pub(super) struct LinePool {
@@ -66,7 +66,7 @@ impl LinePool {
xr: &XrState,
graphics: Arc<WlxGraphics>,
) -> anyhow::Result<usize> {
let id = AUTO_INCREMENT.fetch_add(1, Ordering::Relaxed);
let id = LINE_AUTO_INCREMENT.fetch_add(1, Ordering::Relaxed);
let srd =
create_swapchain_render_data(xr, graphics, [1, 1, 1], SwapchainOpts::new().srgb())?;