Skip to content

Commit 16e8258

Browse files
committed
refactor: rename 16_metal_overlay to 16_full_metal_app
- Rename to better reflect it's a complete application example - Update comprehensive documentation with all features - Add running instructions for different macOS versions - Improve controls documentation with menu/direct sections
1 parent b675c38 commit 16e8258

13 files changed

Lines changed: 86 additions & 46 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ targets = ["x86_64-apple-darwin", "aarch64-apple-darwin"]
7272
rustdoc-args = ["--cfg", "docsrs"]
7373

7474
[[example]]
75-
name = "16_metal_overlay"
76-
path = "examples/16_metal_overlay/main.rs"
75+
name = "16_full_metal_app"
76+
path = "examples/16_full_metal_app/main.rs"
7777
required-features = ["macos_14_0"]
Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,47 @@
1-
//! Metal Renderer with Overlay UI
1+
//! Full Metal Application
22
//!
3-
//! A real GUI application demonstrating:
4-
//! - Metal rendering with compiled shaders
5-
//! - Screen capture via `ScreenCaptureKit` with zero-copy `IOSurface` textures
6-
//! - System content picker (macOS 14.0+) for user-selected capture
7-
//! - Interactive overlay menu with bitmap font rendering
8-
//! - Real-time audio waveform visualization with vertical gain meters
9-
//! - Screenshot capture (macOS 14.0+)
10-
//! - Video recording (macOS 15.0+)
3+
//! A complete macOS application demonstrating the full ScreenCaptureKit API:
4+
//!
5+
//! - **Metal GPU Rendering** - Hardware-accelerated graphics with runtime shader compilation
6+
//! - **Screen Capture** - Real-time display/window capture via ScreenCaptureKit
7+
//! - **Content Picker** - System UI for selecting capture source (macOS 14.0+)
8+
//! - **Audio Visualization** - Real-time waveform display with VU meters
9+
//! - **Screenshot Capture** - Single-frame capture with HDR support (macOS 14.0+/26.0+)
10+
//! - **Video Recording** - Direct-to-file recording (macOS 15.0+)
11+
//! - **Microphone Capture** - Audio input with device selection (macOS 15.0+)
12+
//! - **Bitmap Font Rendering** - Custom 8x8 pixel glyph overlay text
13+
//! - **Interactive Menu** - Keyboard-navigable settings UI
14+
//!
15+
//! ## Running
16+
//!
17+
//! ```bash
18+
//! # Basic (macOS 14.0+)
19+
//! cargo run --example 16_full_metal_app --features macos_14_0
20+
//!
21+
//! # With recording support (macOS 15.0+)
22+
//! cargo run --example 16_full_metal_app --features macos_15_0
23+
//!
24+
//! # With HDR screenshots (macOS 26.0+)
25+
//! cargo run --example 16_full_metal_app --features macos_26_0
26+
//! ```
1127
//!
1228
//! ## Controls
1329
//!
14-
//! Menu navigation (when menu visible):
15-
//! - `UP/DOWN` - Navigate menu items
30+
//! **Menu Navigation** (when menu visible):
31+
//! - `↑`/`↓` - Navigate menu items
32+
//! - `Space`/`Enter` - Select item
33+
//! - `Esc`/`H` - Hide menu
34+
//!
35+
//! **Direct Controls** (when menu hidden):
36+
//! - `P` - Open content picker
37+
//! - `Space` - Start/stop capture
38+
//! - `S` - Take screenshot
39+
//! - `R` - Start/stop recording (macOS 15.0+)
40+
//! - `W` - Toggle waveform display
41+
//! - `M` - Toggle microphone
42+
//! - `C` - Open config menu
43+
//! - `H` - Show menu
44+
//! - `Q`/`Esc` - Quit
1645
1746
#![allow(
1847
clippy::too_many_lines,
@@ -21,25 +50,6 @@
2150
clippy::cast_sign_loss,
2251
clippy::cast_possible_truncation
2352
)]
24-
//! - `SPACE/ENTER` - Select item
25-
//! - `ESC/H` - Hide menu
26-
//!
27-
//! Direct controls (when menu hidden):
28-
//! - `P` - Open content picker
29-
//! - `SPACE` - Start/stop capture
30-
//! - `S` - Take screenshot (when source selected)
31-
//! - `R` - Start/stop recording (macOS 15.0+, requires active capture)
32-
//! - `W` - Toggle waveform display
33-
//! - `C` - Open config menu
34-
//! - `M` - Toggle microphone
35-
//! - `H` - Show menu
36-
//! - `Q/ESC` - Quit
37-
//!
38-
//! ## Run
39-
//!
40-
//! ```bash
41-
//! cargo run --example 16_metal_overlay --features macos_14_0
42-
//! ```
4353

4454
mod capture;
4555
mod font;

0 commit comments

Comments
 (0)