feat: add GLB loading, single-frame output, and GPU recovery - #46
Open
marksverdhei wants to merge 2 commits into
Open
feat: add GLB loading, single-frame output, and GPU recovery#46marksverdhei wants to merge 2 commits into
marksverdhei wants to merge 2 commits into
Conversation
marksverdhei
marked this pull request as ready for review
September 12, 2026 12:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds GLB geometry loading, terminal-independent single-frame text output, and recoverable GPU errors. Models can be rendered into scripts with
a3d model.glb --frame 12x10 --time 4.5. During interactive rendering, automatic mode switches to CPU after GPU setup, allocation, resize, or readback failure; forced GPU mode reports the error after restoring the terminal.GLB and text export implement parts of roadmap #1; GPU device-loss handling addresses a deferred item in #3.
Behavior and scope
--frame WIDTHxHEIGHTwrites a plain-text CPU frame without terminal/GPU initialization. Dimensions are 1–256;--timemust be finite and non-negative.--frame --gpuis rejected.RasterPipeline::new,resize, andrender_frame_gpureturnResult. Callers must handle failures and useGpuContext::new()because device-loss tracking is private. GPU render errors clear the framebuffer; allocation/device errors require rebuilding the pipeline.GLB support does not apply textures, animation, skinning, or morph targets; non-triangle topologies and external buffers are rejected. The accessor budget is not a total scene-memory limit. GPU scope overhead has not been benchmarked separately. These boundaries and API migration guidance are documented in README/SECURITY.
Validation
GitHub CI passes on
cee7f77: Test and MSRV (Rust 1.85).cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-features -- --test-threads=1 --nocapture: 70 passed, 1 intentionally ignored snapshot generator; GPU tests executed without adapter skipsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurescargo test --release --lib model::loader -- --test-threads=1: all 14 loader tests passedgit diff --checkThe three malformed-accessor panics found during initial review are covered by passing regression tests. Generated/local files already match
.gitignore; no additional ignore entries are needed.