Use-case: multiple views of the same data are trivially supported, however gizmos rely on some projection information for sizing and to handle interactions. Applications can hack around this by swapping out the AppData prior to making a Gizmo* call, but this isn't ideal since the context derives some state from AppData during NewFrame.
AppData stack: could use a stack however there's potentially a lot of data to push/pop, plus some processing overhead.
AppData per-layer: much cleaner from the application point of view: SetAppData takes a layer ID and the context stores 1 AppData per layer (by default a copy of the default layer's data). PushLayerId is therefore still cheap to call.
Use-case: multiple views of the same data are trivially supported, however gizmos rely on some projection information for sizing and to handle interactions. Applications can hack around this by swapping out the
AppData
prior to making aGizmo*
call, but this isn't ideal since the context derives some state fromAppData
duringNewFrame
.AppData
stack: could use a stack however there's potentially a lot of data to push/pop, plus some processing overhead.AppData
per-layer: much cleaner from the application point of view:SetAppData
takes a layer ID and the context stores 1AppData
per layer (by default a copy of the default layer's data).PushLayerId
is therefore still cheap to call.