mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
78bf48b874
# Objective - I've been using the `texture_binding_array` example as a base to use multiple textures in meshes in my program - I only realised once I was deep in render code that these helpers existed to create layouts - I wish I knew the existed earlier because the alternative (filling in every struct field) is so much more verbose ## Solution - Use `BindGroupLayoutEntries::with_indices` to teach users that the helper exists - Also fix typo which should be `texture_2d`. ## Alternatives considered - Just leave it as is to teach users about every single struct field - However, leaving as is leaves users writing roughly 29 lines versus roughly 2 lines for 2 entries and I'd prefer the 2 line approach ## Testing Ran the example locally and compared before and after. Before: <img width="1280" alt="image" src="https://github.com/bevyengine/bevy/assets/135186256/f5897210-2560-4110-b92b-85497be9023c"> After: <img width="1279" alt="image" src="https://github.com/bevyengine/bevy/assets/135186256/8d13a939-b1ce-4a49-a9da-0b1779c8cb6a"> Co-authored-by: mgi388 <> |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_color | ||
bevy_compile_test_utils | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_dev_tools | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_ecs_compile_fail_tests | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_macros_compile_fail_tests | ||
bevy_math | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_reflect_compile_fail_tests | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |