SIGN IN SIGN UP
bevyengine / bevy UNCLAIMED

A refreshingly simple data-driven game engine built in Rust

0 0 59 Rust

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>
D
Doonv committed
3f401d150704ed67ec7e7bc4ddbaca6c9a666eb6
Parent: 4e403b6
Committed by GitHub <noreply@github.com> on 5/22/2026, 2:33:16 PM