This renames:
- `get_frame` to `frame`
- `get_frame_mut` to `frame_mut`
- `set_clear_color` to `clear_color`
Which more closely follows convention set by the standard library et al.
* feat(wgpu): upgrade wgpu from 13 to 14
* Address feedback
* Bump tao in `minimal-tao` example
* Bump fltk in `minimal-fltk` example
* Bump egui in `minimal-egui` example
* Bump MSRV to `1.65`
* Bump crates in `imgui-winit` example
* Delete `minimal-sdl2` example
* Fix clippy lints
* Update examples/minimal-egui/src/gui.rs
Co-authored-by: Zageron <hello@zageron.ca>
Co-authored-by: Jay Oster <jay@kodewerx.org>
* 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.
- 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>
- Fixes#140
- Adds a public method to get the current GPU framebuffer texture format (AKA the render texture format).
- This wasn't as difficult as it seemed; the extra API is used by the examples to get the right texture format instead of being hardcoded.
* Update to wgpu 0.9
* Fix validation error in WGSL shader
- This moves the hardcoded vertex positions and texture coordinates to
the vertex buffer.
- Replaces the two-triangle quad to 1 full-screen triangle (fixes#180)
- Rewrites the custom shader example to fix a bug with large surface
textures;
- The input texture size was used for the output texture, causing the
purple rectangle to appear very jumpy on large displays in full screen.
- The `ScalingRenderer` now exposes its clipping rectangle. The custom
shader example uses this for its own clipping rectangle, but it can
also be used for interacting with the border in general.
* Switch to `wgpu::include_wgsl!()`
- This is a nice little simplification.
- Thanks to @JMS55 for the suggestion!
* Validate width and height inputs
- Fixes#157
* Add window size check to `imgui-winit` demo
- There is really nothing better that can be done in this case.
- The surface, buffer, and world sizes must all be non-zero.
- A zero-length surface would (previously) panic in `wgpu`.
- A zero-length buffer would panic with the new assertions.
- A zero-length world would cause a divide-by-zero panic when drawing.
- Was originally resizing the pixel buffer with `PhysicalSize` units, which is definitely incorrect. (The pixel buffer is created with `LogicalSize` units.)
- Updated the World struct to retain its own size information.
- The dependencies are a mess!
- Had to fork `imgui-wgpu`, which sits between 0.12 and 0.13 (has support for `winit` 0.24, but not `wgpu` 0.7)
- This is a temporary fix for CI, until https://github.com/Yatekii/imgui-wgpu-rs/pull/44 is merged and a new release of `imgui-wgpu` is out
- The WIP `wgpu` 0.7 update in https://github.com/parasyte/pixels/pull/134 will be needed for `imgui-wgpu` 0.14
- Update MSRV for `imgui` 0.7
* Add Dear ImGui example
- Closes#90
* Change argument order to match `render_with`
* Remove unnecessary borrow
* Refactor error messages
* Add a space
* Refactor Gui field privacy
* Add a menu bar and allow the about window to be closed
- The local bool is necessary because the menu bar closures are not allowed to borrow `self` for mutable access while `imgui::Ui<'ui>` is alive.
- The token-based menu bar lifetime is even more verbose than this.