gfx-rs/wgpu

Bunnymark example does not recompute its projection matrix and other parameters when the canvas size changes

オープン

#5,890 opened on 2024/06/28

 (12 件のコメント) (0 件のリアクション) (1 人の担当者)Rust (703 件のフォーク)batch import
good first issuetype: bug

Repository metrics

Stars
 (9,290 個のスター)
PR merge metrics
 (平均マージ 12d 4h) (30d で 117 merged PRs)

説明

Description examples/src/bunnymark/mod.rs computes an Orthographic RH matrix on page load, but if the canvas is resized, the matrix is not recomputed.

See all uses of config.width and config.height inside examples/src/bunnymark/mod.rs

Repro steps (1) Open https://wgpu.rs/examples/?backend=webgpu&example=bunnymark in Chrome 126.0.6478.127 (2) Resize the window

Expected vs observed behavior Observed: Bunnies bounce outside of the canvas or don't bounce to the top

Expected: bunnies bounce within the resized canvas

Extra materials

https://github.com/gfx-rs/wgpu/assets/105083895/a41bfd50-c2df-4200-937a-0ee0bcf3bc5a

Platform macOS using Chrome Version 128.0.6562.0 (Official Build) canary (arm64)

コントリビューターガイド