fix: image appearing over alternate screen
This commit is contained in:
+14
-1
@@ -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,
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user