The main goal of this change is to avoid having to select the
"per renderable" UBO at execution time. Instead we want the
PrimitiveInfo structure to already know which UBO will be used.
Concretely, this means that this determination must be done when
the RenderPass is created.
When automatic instancing is used, the RenderPass creates a temporary
UBO to store the instance info. This UBO's life-time is dictated by both
the life-time of the RenderPass and the Executors that where created
from it. For this reason we introduce SharedHandle<> to correctly
account for the owner's lifetime. This fixes a potential bugs where
that handle could have been destroyed and used later; in practice this
bug didn't happen however.
A couple other changes:
RenderPass has a bunch of fields that were actually temporary, so we
removed those.
The canonical "per-renderable" UBO was owned by View but accessed
through Scene. This was confusing, it's now accessed through View.
The main goal of this change is to avoid having to select the "per renderable" UBO at execution time. Instead we want the PrimitiveInfo structure to already know which UBO will be used. Concretely, this means that this determination must be done when the RenderPass is created.
When automatic instancing is used, the RenderPass creates a temporary UBO to store the instance info. This UBO's life-time is dictated by both the life-time of the RenderPass and the Executors that where created from it. For this reason we introduce SharedHandle<> to correctly account for the owner's lifetime. This fixes a potential bugs where that handle could have been destroyed and used later; in practice this bug didn't happen however.
A couple other changes:
RenderPass has a bunch of fields that were actually temporary, so we removed those.
The canonical "per-renderable" UBO was owned by View but accessed through Scene. This was confusing, it's now accessed through View.