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

Method mouseWheelCallback

Source/Falcor/Core/Window.cpp:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 }
136
137 static void mouseWheelCallback(GLFWwindow* pGlfwWindow, double scrollX, double scrollY)
138 {
139 Window* pWindow = (Window*)glfwGetWindowUserPointer(pGlfwWindow);
140 if (pWindow != nullptr)
141 {
142 MouseEvent event;
143 event.type = MouseEvent::Type::Wheel;
144 double x, y;
145 glfwGetCursorPos(pGlfwWindow, &x, &y);
146 event.pos = calcMousePos(x, y, pWindow->getMouseScale());
147 event.wheelDelta = (float2(float(scrollX), float(scrollY)));
148
149 pWindow->mpCallbacks->handleMouseEvent(event);
150 }
151 }
152
153 static void errorCallback(int errorCode, const char* pDescription)
154 {

Callers

nothing calls this directly

Calls 1

handleMouseEventMethod · 0.45

Tested by

no test coverage detected