samples/hidpi: add live mouse coordinate readout - #582
Open
pusewicz wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an on-screen diagnostic line to the hidpi sample to display the current mouse position in both screen coordinates and the corresponding world-space position via cf_screen_to_world, making it easier to visually validate HiDPI mouse-coordinate mapping against known drawn geometry.
Changes:
- Add a live
mouse: screen (x, y) -> world (x, y)readout rendered near the existingpixel_scalereadout. - Extend the sample header comment to describe the new diagnostic output.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Shows raw screen coordinates next to cf_screen_to_world's translation, so the HiDPI mouse mapping can be eyeballed against known shape positions at any pixel scale.
pusewicz
force-pushed
the
hidpi-sample-mouse-readout
branch
from
August 20, 2026 10:08
732c101 to
662f7ca
Compare
Contributor
Author
|
@RandyGaul this adds extra info about the mouse coords to the hide sample. |
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.
Adds a
mouse: screen (x, y) -> world (x, y)readout line to the hidpi sample, next to the existingpixel_scaleline -- so HiDPI mouse-coordinate mapping can be eyeballed against known shape positions at any pixel scale, not just glyph/shape crispness.Second slice of the #579 split -- pure sample addition, no engine changes.
Note: The scale of the rendered content is incorrect, which will be fixed in the upcoming PRs.