- 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
- 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.
- 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>
- 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!
* Update egui-winit example to greatly simplify the platform event handler
- I was able to upstream this logic into the egui_winit_platform crate
* Fix the wgpu validation error
* 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