MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ Surface() [1/3]

MayaFlux::Portal::Forma::Surface::Surface ( std::shared_ptr< Core::Window window,
std::shared_ptr< Layer layer,
std::shared_ptr< Context ctx 
)
inline

Construct a Surface around a pre-built Layer and Context.

Surface takes shared ownership of all three components. The caller is responsible for ensuring the Layer and Context were constructed against window.

The default factory Portal::Forma::create_surface delegates here after building a fresh Layer and Context against the global EventManager. Call this constructor directly when you need a custom Context subclass or want to share a Layer across multiple Contexts.

Parameters
windowTarget window. Must match the window the Context was constructed against.
layerPre-built Layer.
ctxPre-built Context, already wired to window.

Definition at line 81 of file Surface.hpp.

84 : m_window(std::move(window))
85 , m_layer(std::move(layer))
86 , m_ctx(std::move(ctx))
87 {
88 }
const std::shared_ptr< Core::Window > & window() const noexcept
Access the rendering target window.
Definition Surface.hpp:126
std::shared_ptr< Core::Window > m_window
Definition Surface.hpp:161
Context & ctx() noexcept
Access the event router.
Definition Surface.hpp:118
Layer & layer() noexcept
Access the spatial registry.
Definition Surface.hpp:107
std::shared_ptr< Context > m_ctx
Definition Surface.hpp:163
std::shared_ptr< Layer > m_layer
Definition Surface.hpp:162