forked from 1b-agent/opencadstudio-upstream
Share source buffers across block placements and render nested content with GPU instance transforms.\n\nChunk silhouettes and compact mesh material data so large drawings stay under device buffer limits and remain responsive.
14 lines
315 B
Rust
14 lines
315 B
Rust
use std::sync::atomic::{AtomicU64, Ordering};
|
|
|
|
static NEXT_SOURCE_ID: AtomicU64 = AtomicU64::new(1);
|
|
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub struct RenderInstance {
|
|
pub source_id: u64,
|
|
pub translation: [f64; 3],
|
|
}
|
|
|
|
pub fn next_source_id() -> u64 {
|
|
NEXT_SOURCE_ID.fetch_add(1, Ordering::Relaxed)
|
|
}
|