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

◆ glfw_window_size_callback()

void MayaFlux::Core::GlfwWindow::glfw_window_size_callback ( GLFWwindow *  window,
int  width,
int  height 
)
staticprivate

Definition at line 231 of file GlfwWindow.cpp.

232{
233 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
234 if (win && win->m_event_callback) {
235 win->m_state.current_width = width;
236 win->m_state.current_height = height;
237
238 if (win->m_event_callback) {
239 WindowEvent event;
241 event.timestamp = glfwGetTime();
242 event.data = WindowEvent::ResizeData {
243 .width = static_cast<uint32_t>(width),
244 .height = static_cast<uint32_t>(height)
245 };
246 win->m_event_callback(event);
247 }
248 }
249}
GlfwWindow(const WindowCreateInfo &create_info, const GraphicsSurfaceInfo &surface_info, GlobalGraphicsConfig::GraphicsApi api, GlfwPreInitConfig pre_init_config={})
Creates a window with the given configuration.

References MayaFlux::Core::WindowState::current_width, m_state, MayaFlux::Core::WindowEvent::type, MayaFlux::Core::WindowEvent::ResizeData::width, and MayaFlux::Core::WINDOW_RESIZED.

Referenced by setup_callbacks().

+ Here is the caller graph for this function: