MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / mouseMoveCallback

Method mouseMoveCallback

Source/Falcor/Core/Window.cpp:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 static void mouseMoveCallback(GLFWwindow* pGlfwWindow, double mouseX, double mouseY)
85 {
86 Window* pWindow = (Window*)glfwGetWindowUserPointer(pGlfwWindow);
87 if (pWindow != nullptr)
88 {
89 // Prepare the mouse data
90 MouseEvent event;
91 event.type = MouseEvent::Type::Move;
92 event.pos = calcMousePos(mouseX, mouseY, pWindow->getMouseScale());
93 event.screenPos = {mouseX, mouseY};
94 event.wheelDelta = float2(0, 0);
95
96 pWindow->mpCallbacks->handleMouseEvent(event);
97 }
98 }
99
100 static void mouseButtonCallback(GLFWwindow* pGlfwWindow, int button, int action, int modifiers)
101 {

Callers

nothing calls this directly

Calls 1

handleMouseEventMethod · 0.45

Tested by

no test coverage detected