summaryrefslogtreecommitdiff
path: root/crates/renderer/src/main.rs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-08-15 04:45:02 -0400
committerLLLL Colonq <llll@colonq>2025-08-15 04:45:02 -0400
commit891a8a79f200413f2b1ac6e158f26163d6c66f64 (patch)
treed2ef73072d2c5c8a9661c5a606a7049e3bf35b8e /crates/renderer/src/main.rs
parente4ded2c09e6c378040f80e80886aa9c087fe14b4 (diff)
Refactor overlay
Diffstat (limited to 'crates/renderer/src/main.rs')
-rw-r--r--crates/renderer/src/main.rs30
1 files changed, 11 insertions, 19 deletions
diff --git a/crates/renderer/src/main.rs b/crates/renderer/src/main.rs
index 4b3f6e3..fa35852 100644
--- a/crates/renderer/src/main.rs
+++ b/crates/renderer/src/main.rs
@@ -15,34 +15,26 @@ pub fn main() -> Erm<()> {
.subcommand_required(true)
.arg_required_else_help(true)
.subcommand(
- Command::new("shader-overlay")
- .about("Run the shader display in a full-screen transparent overlay")
- )
- .subcommand(
- Command::new("model-overlay")
- .about("Run the LCOLONQ model renderer in a full-screen transparent overlay")
+ Command::new("overlay")
+ .about("Run the full-screen transparent overlay")
)
.subcommand(
Command::new("model-terminal")
.about("Run the LCOLONQ model renderer in a terminal")
)
- .subcommand(
- Command::new("model-multi-overlay")
- .about("Run the LCOLONQ + Maude multi model renderer in a full-screen transparent overlay")
- )
.get_matches();
match matches.subcommand() {
- Some(("shader-overlay", _cm)) => {
- teleia::run("LCOLONQ", 1920, 1080, teleia::Options::OVERLAY, overlay::shader::Overlay::new)?;
- },
- Some(("model-overlay", _cm)) => {
- teleia::run("LCOLONQ", 1920, 1080, teleia::Options::OVERLAY, overlay::model::Overlay::overlay)?;
+ Some(("overlay", _cm)) => {
+ teleia::run("LCOLONQ", 1920, 1080, teleia::Options::OVERLAY, |ctx| {
+ overlay::Overlays::new(ctx, vec![
+ Box::new(overlay::automata::Overlay::new(ctx)),
+ Box::new(overlay::shader::Overlay::new(ctx)),
+ Box::new(overlay::drawing::Overlay::new(ctx)),
+ ])
+ })?;
},
Some(("model-terminal", _cm)) => {
- teleia::run("LCOLONQ", 1920, 1080, teleia::Options::HIDDEN, overlay::model::Overlay::terminal)?;
- },
- Some(("model-multi-overlay", _cm)) => {
- teleia::run("LCOLONQ", 1920, 1080, teleia::Options::OVERLAY, overlay::multi::Overlay::new)?;
+ teleia::run("LCOLONQ", 1920, 1080, teleia::Options::HIDDEN, overlay::model::Terminal::new)?;
},
_ => unreachable!("no subcommand"),
}