hadronized / luminance-rs

Type-safe, type-level and stateless Rust graphics framework
https://phaazon.github.io/learn-luminance/
Other
1.09k stars 59 forks source link

Use a type family and GAT to simplify vertex entity memory schemes. #618

Closed hadronized closed 1 year ago

hadronized commented 1 year ago

Instead of using VertexEntity<V, …, Interleaved, …>, one can now use something like VertexEntity<V, …, Interleaving, …>. The way it works is by implementing a new trait, VertexStorageFamily, which has an associated type (type family) using a GAT:

type Storage: AsVertexStorage;