bevy/crates/bevy_render/src
Robin KAY defeeb375b
Fix size of MeshVertexAttributeId to be platform independent (#6624)
# Objective

`MeshVertexAttributeId` is currently a wrapper type around a `usize`.
Application developers are exposed to the `usize` whenever they need to
define a new custom vertex attribute, which requires them to generate a
random `usize` ID to avoid clashes with any other custom vertex
attributes in the same application. As the range of a `usize` is
platform dependent, developers on 64-bit machines may inadvertently
generate random values which will fail to compile for a 32-bit target.
The use of a `usize` here encourages non-portable behaviour and should
be replaced with a fixed width type.

## Solution

In this PR I have changed the ID type from `usize` to `u64`, but equally
a `u32` could be used at the risk of breaking some extant non-portable
programs and increasing the chance of an ID collision.
2024-08-19 21:09:20 +00:00
..
batching View filter for batch_and_prepare_render_phase (#14713) 2024-08-12 16:15:54 +00:00
camera Add depth_ndc_to_view_z for cpu-side (#14590) 2024-08-02 15:37:29 +00:00
diagnostic Wgpu 0.20 (#13186) 2024-06-14 18:39:31 +00:00
mesh Fix size of MeshVertexAttributeId to be platform independent (#6624) 2024-08-19 21:09:20 +00:00
primitives Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
render_graph Don't ignore draw errors (#13240) 2024-07-22 19:22:30 +00:00
render_phase Use #[doc(fake_variadic)] to improve docs readability (#14703) 2024-08-12 18:54:33 +00:00
render_resource Update WGPU to version 22 (#14401) 2024-08-12 16:55:18 +00:00
renderer Update WGPU to version 22 (#14401) 2024-08-12 16:55:18 +00:00
texture Add feature requirement info to image loading docs (#13712) 2024-08-16 23:43:20 +00:00
view Add custom cursors (#14284) 2024-08-12 15:49:03 +00:00
alpha.rs Implement alpha to coverage (A2C) support. (#12970) 2024-04-15 20:37:52 +00:00
color_operations.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
extract_component.rs Fix some nightly Clippy lints (#12927) 2024-04-13 02:05:38 +00:00
extract_instances.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
extract_param.rs Enable the unsafe_op_in_unsafe_fn lint (#11591) 2024-01-28 23:18:11 +00:00
extract_resource.rs Add error when extract resource build fails (#4964) 2024-04-28 05:20:59 +00:00
globals.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
gpu_component_array_buffer.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lib.rs Add RenderSet::FinalCleanup for World::clear_entities (#14764) 2024-08-15 18:48:43 +00:00
maths.wgsl add tonemapping LUT bindings for sprite and mesh2d pipelines (#13262) 2024-05-28 12:09:26 +00:00
pipelined_rendering.rs Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
render_asset.rs Pack multiple vertex and index arrays together into growable buffers. (#14257) 2024-07-16 20:33:15 +00:00
settings.rs Update WGPU to version 22 (#14401) 2024-08-12 16:55:18 +00:00
spatial_bundle.rs Clearer spatial bundle pub const docs (#14293) 2024-07-15 16:03:09 +00:00