gfx-rs / gfx_scene

deprecated
Apache License 2.0
15 stars 1 forks source link

Render fragments #30

Closed kvark closed 9 years ago

kvark commented 9 years ago

It used to make sense to have entities mapping 1:1 with materials. However, for a number of reasons we should have more fattier entities:

  1. There is no longer a gfx_phase::Entity trait
  2. Visibility and bounding box are shared between fragments, improving the performance
  3. They get transformed into render objects that are sortable anyway

Plus, we get an additional convenience of treating an entity as a compound thing, easy to manage for the user.