Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Extension to allow placing objects right into the buffers, taking ownership.
This extension is mostly helpful for writing unit-tests, and beyond that for the rather unusual case where we need to place an full-blown object into the buffer, instead of just plain data. A possible use case for this mechanism is to allow for state per calculation stream, feeding this local state to the individual render node embedded into a "state frame". Some effect processors indeed need to maintain state beyond the single frame (e.g. averaging, integrating, sound compression), which usually is handled by applying an "instance" of that processor to the frames to be calculated in a straight sequence.
BuffHandle and the underlying BufferProvider standard implementation support that case by attaching an object managing functor to the metadata. This way, the state can live directly embedded into the frame and still be accessed like an object. To keep the header and compilation footprint low, the implementation of the functions supporting this special case was split out of the basic buffhandle.hpp
Definition in file buffhandle-attach.hpp.
#include "lib/error.hpp"
#include "steam/engine/buffer-provider.hpp"
#include "steam/engine/buffhandle.hpp"
Macros | |
#define | _EXCEPTION_SAFE_INVOKE(_CTOR_) |
Namespaces | |
steam | |
Steam-Layer implementation namespace root. | |
steam::engine | |
Lumiera's render engine core and operational control. | |
#define _EXCEPTION_SAFE_INVOKE | ( | _CTOR_ | ) |
Definition at line 62 of file buffhandle-attach.hpp.