MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / window_size_callback

Function window_size_callback

framework/platform/glfw_window.cpp:47–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void window_size_callback(GLFWwindow *window, int width, int height)
48{
49 if (auto platform = reinterpret_cast<Platform *>(glfwGetWindowUserPointer(window)))
50 {
51 platform->resize(width, height);
52
53#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
54 // On Wayland, window may lose focus during resize. Force focus to ensure rendering continues.
55 platform->set_focus(true);
56#endif
57 }
58}
59
60void window_focus_callback(GLFWwindow *window, int focused)
61{

Callers

nothing calls this directly

Calls 2

set_focusMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected