|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Infrastructure for a continuously-mapped value whose GPU geometry tracks it. More...
#include <Mapped.hpp>
Collaboration diagram for MayaFlux::Portal::Forma::Mapped< T >:Public Member Functions | |
| void | sync () |
| Call once per graphics tick. | |
Public Attributes | |
| Element | element |
| The Element registered with the Layer. | |
| bool | force_redraw_on_sync { false } |
| When true, sync() regenerates geometry every call regardless of whether state->version has advanced. | |
| GeometryFn< T > | geometry_fn |
| Geometry regeneration function. Set once at construction. | |
| Version | last_version { static_cast<Version>(-1) } |
| Last version seen by sync(). | |
| std::shared_ptr< MappedState< T > > | state |
| Shared value carrier. External systems hold a copy of this ptr. | |
Private Attributes | |
| std::vector< uint8_t > | m_bytes |
Infrastructure for a continuously-mapped value whose GPU geometry tracks it.
The geometry function IS the primitive. Mapped provides only the mechanism: a shared value carrier, a version counter, and a sync() call that invokes the geometry function when the value changes.
The geometry function decides everything about shape, topology, and vertex layout. It can write from any source — mouse pixel coordinates, microphone energy, another node's output, a tendency field, a computed function of time — by whatever means the caller chooses. The common geometry helpers in Geometry.hpp are illustrative, not idiomatic.
Orchestration (node binding, buffer mapping, scheduler-driven update, input capture) attaches externally by writing to state and calling state->write(v). Mapped has no knowledge of or dependency on any orchestration layer.
| T | Value type. |
Definition at line 89 of file Mapped.hpp.