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.
Let the upstream Dear imgui backends do the DPI scaling and delete our mouse position hacks.
This fixes DPI scaling for glfw_wgpu backend (#3) but exposes a bug in Dawn's vulkan backend. We work around this by ensuring the viewport size is clamped. However, there remains a validation error that results in a crash if the window size is increased; this appears to be a bug in the imgui wgpu backend, where the render target is not resized before the viewport is set.
This ought to be fixed or worked-around before this is merged.
Note: We're going to have to bring Dawn up to a newer version at some point but it's no small feat.
To test these changes, check out zig-gamedev/zig-gamedev#755 and run
zig build triangle_wgpu-run
.