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

◆ glfw_framebuffer_size_callback()

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

Definition at line 305 of file GlfwWindow.cpp.

306{
307 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
308 if (!win)
309 return;
310
311 WindowEvent event;
313 event.timestamp = glfwGetTime();
314 event.data = WindowEvent::ResizeData {
315 .width = static_cast<uint32_t>(width),
316 .height = static_cast<uint32_t>(height)
317 };
318
319 win->m_event_source.signal(event);
320
321 if (win->m_event_callback) {
322 win->m_event_callback(event);
323 }
324}
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::FRAMEBUFFER_RESIZED, MayaFlux::Core::WindowEvent::type, and MayaFlux::Core::WindowEvent::ResizeData::width.

Referenced by setup_callbacks().

+ Here is the caller graph for this function: