MayaFlux 0.1.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 221 of file GlfwWindow.cpp.

222{
223 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
224 if (win && win->m_event_callback) {
225 win->m_state.current_width = width;
226 win->m_state.current_height = height;
227
228 if (win->m_event_callback) {
229 WindowEvent event;
231 event.timestamp = glfwGetTime();
232 event.data = WindowEvent::ResizeData {
233 .width = static_cast<uint32_t>(width),
234 .height = static_cast<uint32_t>(height)
235 };
236 win->m_event_callback(event);
237 }
238 }
239}
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: