Commit Graph

2 Commits

Author SHA1 Message Date
Doonv 3f401d1507 Update examples to use Image::new_target_texture instead of manual image creation when possible (#23715)
# Objective

Fix #19101. (Kinda, this is not the exact solution proposed in that
issue, but it still shortens most of the examples)

## Solution

Most of the images created in examples are for use in render targets.
`Image::new_target_texture` is made for exactly that and significantly
shortens the image creation process.

## Testing

I tested all the examples I changed and they seem to work fine.

--- 

btw for some reason most of the examples use
`TextureFormat::Bgra8UnormSrgb` while the documentation for
`Image::new_target_texture` recommends `TextureFormat::Rgba8UnormSrgb`
for SDR images. What's up with that?

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2026-05-22 14:33:16 +00:00
WaterWhisperer 727a350fc6 Sort the UI examples into sub-dirs (#22727)
# Objective

- Fixes #22644

## Solution

- Create new subdirectories for categorization, and update the paths in
`Cargo.toml` and `README`.

## Testing

- `cargo check --example *`
2026-02-01 18:14:10 +00:00