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

◆ create_window()

std::shared_ptr< Window > MayaFlux::Core::WindowManager::create_window ( const WindowCreateInfo create_info)

Creates a new window.

Parameters
create_infoWindow creation parameters
Returns
Pointer to created window (owned by manager)

Definition at line 34 of file WindowManager.cpp.

35{
36 if (m_window_lookup.count(create_info.title) > 0) {
38 "Window with title '{}' already exists", create_info.title);
39 return nullptr;
40 }
41
43 "Creating window '{}' ({}x{}), for platform {}", create_info.title, create_info.width, create_info.height, get_platform_name());
44
45 auto window = create_window_internal(create_info);
46 if (!window) {
47 return nullptr;
48 }
49
50 m_windows.push_back(window);
51 m_window_lookup[create_info.title] = window;
52
53 if (window->get_create_info().register_for_processing) {
54 m_processing_windows.push_back(window);
55 }
56
58 "Created window '{}' - total: {}", create_info.title, m_windows.size());
59
60 return window;
61}
#define MF_INFO(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::vector< std::shared_ptr< Window > > m_windows
std::shared_ptr< Window > create_window_internal(const WindowCreateInfo &create_info)
Factory for creating backend-specific windows.
std::unordered_map< std::string, std::weak_ptr< Window > > m_window_lookup
std::vector< std::shared_ptr< Window > > m_processing_windows
@ WindowingSubsystem
Windowing system operations (GLFW, SDL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, create_window_internal(), MayaFlux::Core::WindowCreateInfo::height, m_processing_windows, m_window_lookup, m_windows, MF_INFO, MF_WARN, MayaFlux::Core::WindowCreateInfo::title, MayaFlux::Core::WindowCreateInfo::width, and MayaFlux::Journal::WindowingSubsystem.

Referenced by MayaFlux::create_window().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: