refactor: bundle render args into RenderParams - #30
Draft
marksverdhei wants to merge 1 commit into
Draft
Conversation
Group the five shared pose/shading args (azimuth, altitude, zoom, light_dir, fg_override) into a RenderParams struct passed by reference. render_frame goes 7 args -> 3, render_frame_gpu 8 -> 4, which drops render_frame_gpu's #[allow(clippy::too_many_arguments)] (rasterize_triangle's per-triangle one stays). Behavior-preserving: GPU/CPU output stays byte-identical (gpu_compare 0.00%), full suite green (41 tests). Addresses the RenderParams judgment call in #3 — opened as a draft so the API shape can be reviewed before committing to it pre-1.0.
37 tasks
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.
Draft — for your decision on the
RenderParamsjudgment call (#3). Opened as a draft so you can see the concrete diff before committing to the API shape; not meant to merge without your go-ahead.Groups the five shared pose/shading arguments (
azimuth,altitude,zoom,light_dir,fg_override) into aRenderParamsstruct passed by reference:Pros
render_frame7 args → 3;render_frame_gpu8 → 4. Dropsrender_frame_gpu's#[allow(clippy::too_many_arguments)](the per-trianglerasterize_triangleallow stays — its args don't bundle).Cons / why it's a judgment call
Verification: behavior-preserving — GPU/CPU output stays byte-identical (
gpu_compare0.00%), full suite green (41 tests), fmt + clippy-D warningsclean.Merge if you like the shape; otherwise close and I'll keep the deferral note in #3.