Skip to content

Commit

Permalink
Remove unnecessary allocations from custom shaders
Browse files Browse the repository at this point in the history
While this new approach made the single-function drawing operations a
thing of the past, this new approach allows for implementing the example
without the option-initialize flow, and it supports the ability for
custom drawing operations to take parameters and pass information
through to the render phase.
  • Loading branch information
ecton committed Nov 2, 2024
1 parent c815ab4 commit e68ddc7
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 139 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
outlines drawn in the user interface.
- `FocusColor` is a new component that controls the color of the keyboard focus
indicator.
- `Graphics::draw` is a new function that allows performing arbitrary `wgpu`
drawing operations when rendering. See the `shaders.rs` example for an example
on how to use this to render into a Canvas with a custom shader.
- `Graphics::draw` and `Graphics::draw_with` are a new function that allows
performing arbitrary `wgpu` drawing operations when rendering. See the
`shaders.rs` example for an example on how to use this to render into a Canvas
with a custom shader.


[139]: https://github.com/khonsulabs/cushy/issues/139
Expand Down
92 changes: 46 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e68ddc7

Please sign in to comment.