|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
|
inline |
Call whenever state may have changed: once per graphics tick for a continuously-changing source with no discrete trigger (Bridge::bind's GraphicsRoutine does this), or directly from the event handler that changed state->value when the trigger is already known (a click, a scroll, a key) - no polling needed for the latter, same as Collapsible's own on_press calling sync() straight from the handler.
If state->version has advanced since last_version, invokes geometry_fn with the current value into a local byte buffer, then passes the result to VKBuffer::set_data so the existing upload path handles GPU transfer.
| layer | Optional. Layer::add() stored a separate copy of element when this Mapped was registered, so a geometry_fn that updates element.bounds_hint/contains (a fader's handle, a radial indicator) only changes this Mapped's own copy unless that copy is pushed back. Passing the Layer this element was registered on does that push after geometry_fn runs, keeping hit-testing correct past the first frame instead of just the rendered buffer. |
Definition at line 149 of file Mapped.hpp.
References MayaFlux::Portal::Forma::Element::bounds_hint, MayaFlux::Portal::Forma::Element::buffer, MayaFlux::Portal::Forma::Element::contains, MayaFlux::Portal::Forma::Mapped< T >::element, MayaFlux::Portal::Forma::Mapped< T >::force_redraw_on_sync, MayaFlux::Portal::Forma::Mapped< T >::geometry_fn, MayaFlux::Portal::Forma::Element::id, MayaFlux::Portal::Forma::Mapped< T >::last_version, MayaFlux::Portal::Forma::Mapped< T >::m_bytes, MayaFlux::Portal::Forma::Mapped< T >::state, and MayaFlux::Portal::Forma::FormaTarget::submit().
Referenced by MayaFlux::Portal::Forma::Collapsible::place().
Here is the call graph for this function:
Here is the caller graph for this function: