bevy/examples/2d
Rob Parrett 1a85fb5ea3 Fix mesh2d_manual example (#4037)
# Objective

Fixes #4036 

## Solution

- Use `VertexBufferLayout::from_vertex_formats`
- Actually put a u32 into `ATTRIBUTE_COLOR` and convert it in the shader

I'm not 100% sure about the color stuff. It seems like `ATTRIBUTE_COLOR` has been `Uint32` this whole time, but this example previously worked with `[f32; 4]` somehow, perhaps because the vertex layout was manually specified.

Let me know if that can be improved, or feel free to close for an alternative fix.
2022-03-08 17:50:44 +00:00
..
contributors.rs Add docs and common helper functions to Windows (#4107) 2022-03-08 00:46:04 +00:00
many_sprites.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
mesh2d.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
mesh2d_manual.rs Fix mesh2d_manual example (#4037) 2022-03-08 17:50:44 +00:00
move_sprite.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
rect.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
rotation.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
sprite.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
sprite_flipping.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
sprite_sheet.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
text2d.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
texture_atlas.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00