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

Function cursor_position_callback

framework/platform/glfw_window.cpp:239–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239void cursor_position_callback(GLFWwindow *window, double xpos, double ypos)
240{
241 if (auto *platform = reinterpret_cast<Platform *>(glfwGetWindowUserPointer(window)))
242 {
243 platform->input_event(MouseButtonInputEvent{
244 MouseButton::Unknown,
245 MouseAction::Move,
246 static_cast<float>(xpos),
247 static_cast<float>(ypos)});
248 }
249}
250
251void mouse_button_callback(GLFWwindow *window, int button, int action, int /*mods*/)
252{

Callers

nothing calls this directly

Calls 1

input_eventMethod · 0.45

Tested by

no test coverage detected