* Update dependencies
- Closes#270
* Unify controls in Invaders example
The fire button on gamepads was allowing trapid fire when holding the
button. Keyboard controls required the fire key to be released between
each shot fired. This commit fixes the difference by making the gamepad
fire button act like the keyboard fire key.
- Minor rewrite of the winit integration using the `game-loop` crate for
fixed time-step updates.
- Updates are now handled at 240 fps, regardless of frame rate.
- Frame rate is capped at 240 fps.
- Adds a pause key.
- Closes#11
- Rather than setting the position and window size based on available
screen space, this PR just creates a window with a default size and
doesn't attempt to set the position.
- Closes#29
- Closes#235
- Now using alpha blending (non-premultiplied) in the scaling renderer
so that the clear color can be blended with the texture. This can be
made configurable, but we'll go with this for now.
* Fix half-pixel offsets in scaling renderer
- This bug was very subtle. It can be hard to notice!
- Context: When the scaling renderer transformation matrix is created,
it needs to center the image within the border.
- The previous code always evaluated the translation to (0, 0)
- This PR makes half-pixel adjustments to the translation when needed,
making it impossible to rasterize the texture on a half-pixel
boundary.
- I spotted this while working on pixel-aspect-ratio support, but it can
most easily be witnessed in the `conway` example by grabbing the top
or bottom resize handle on the window and slow dragging it up and down
by 1-pixel-at-a-time. When you hit a half-pixel bug the entire texture
will change slightly; some pixels will become hidden or duplicated.
* Bump MSRV
- Vertex UVs can be computed from the positions, which saves a small amount of code and a small amount of bandwidth (both inconsequential).
- This is mostly for readability.
- Fixes vertically-flipped pixel buffer in the `custom-shader` example.
- Fixes a regression caused by #223
- `downlevel_webgl2_defaults` only supports 2048x2048 pixels buffers
- This will allow pixel buffers up to the max supported by the hardware
- Cargo treats non-prefixed version numbers the same when the patch number is omitted.
- This is just cleaner and makes breaking updates easier to manage.
- It would be nice to return an error from the render function
- imgui-winit is still a WIP (open PR: https://github.com/Yatekii/imgui-wgpu-rs/pull/66)
- Update README
Co-authored-by: Mohammed Alyousef <mohammed.alyousef@neurosrg.com>