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

◆ create_surface()

MAYAFLUX_API Surface MayaFlux::Portal::Forma::create_surface ( std::shared_ptr< Core::Window window,
std::string  name 
)

Construct a Surface, creating Layer and Context internally.

Builds a fresh Layer and a Context wired to window using the EventManager stored by Portal::Forma::initialize. Equivalent to Portal::Forma::create_layer(window, name) plus owning the window pointer alongside.

For the power-tinkerer case (custom Context subclass, shared Layer across multiple Contexts, etc.), construct Surface directly via its (Window, Layer, Context) constructor.

Parameters
windowTarget window. Must outlive the Surface.
nameUnique name scoping the Context's event coroutines. Must be unique across all live Contexts.
Precondition
Portal::Forma::initialize() must have been called.
Returns
A new Surface owning the window pointer plus the freshly created Layer and Context.

Definition at line 74 of file Forma.cpp.

75{
76 return internal::atelier().create_surface(std::move(window), std::move(name));
77}
std::string name
Definition VKDevice.cpp:143

References MayaFlux::Portal::Forma::internal::atelier(), MayaFlux::Portal::Forma::internal::Atelier::create_surface(), and name.

+ Here is the call graph for this function: