♻️ Refactor into render submodules

This commit is contained in:
Belén Albeza 2024-12-10 15:03:15 +01:00
parent 647635a819
commit 001aa3f319
3 changed files with 76 additions and 69 deletions

View file

@ -0,0 +1,26 @@
use crate::debug;
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct RenderOptions {
pub debug_flags: u32,
pub dpr: Option<f32>,
}
impl Default for RenderOptions {
fn default() -> Self {
Self {
debug_flags: 0x00,
dpr: None,
}
}
}
impl RenderOptions {
pub fn is_debug_visible(&self) -> bool {
self.debug_flags & debug::DEBUG_VISIBLE == debug::DEBUG_VISIBLE
}
pub fn dpr(&self) -> f32 {
self.dpr.unwrap_or(1.0)
}
}