martty/vuk

Enhancement: Name composition

Tearnote opened this issue · 2 comments

I propose adding operator+ for vuk::Name, which returns a new concatenated Name with an optional joiner string in between (underscore sounds like a sensible default.) It could also be an alternate constructor taking two Name arguments.

The purpose is to support basic scoping of rendergraph identifiers. Currently, it is difficult to create rendergraph components that can be appended to a rendergraph more than once, because of resource name collisions. Concatenation would allow for an interface where the component itself is passed a Name on creation, and it uses that name as a prefix for all the resources it creates.

Name joining is available from v0.3, but with a different API - let me know if you'd prefer it with operator+.

This is solved by the automatic name appending when composing RenderGraphs via Futures