fix: image appearing over alternate screen

This commit is contained in:
2026-07-04 21:18:12 +02:00
parent 96b85f0159
commit 04b6776ebf
7 changed files with 344 additions and 162 deletions
+14 -1
View File
@@ -4,6 +4,19 @@
//! All structures use `#[repr(C)]` and implement `bytemuck::Pod` for GPU compatibility.
use bytemuck::{Pod, Zeroable};
use std::sync::atomic::{AtomicU64, Ordering};
/// Unique identifier for a pane.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub struct PaneId(pub u64);
impl PaneId {
/// Generate a new unique pane ID.
pub fn new() -> Self {
static COUNTER: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
Self(COUNTER.fetch_add(1, std::sync::atomic::Ordering::SeqCst))
}
}
// ═══════════════════════════════════════════════════════════════════════════════
// CONSTANTS
@@ -148,8 +161,8 @@ pub struct ImageUniforms {
pub src_y: f32,
pub src_width: f32,
pub src_height: f32,
pub dim_factor: f32,
pub _padding1: f32,
pub _padding2: f32,
}
// ═══════════════════════════════════════════════════════════════════════════════