Function mouseMoveCallback

Synopsis

#include <Source/Falcor/Core/Window.cpp>

static void mouseMoveCallback(GLFWwindow *pGlfwWindow, double mouseX, double mouseY)

Description

No description yet.

Source

Lines 98-112 in Source/Falcor/Core/Window.cpp.

static void mouseMoveCallback(GLFWwindow* pGlfwWindow, double mouseX, double mouseY)
{
    Window* pWindow = (Window*)glfwGetWindowUserPointer(pGlfwWindow);
    if (pWindow != nullptr)
    {
        // Prepare the mouse data
        MouseEvent event;
        event.type = MouseEvent::Type::Move;
        event.pos = calcMousePos(mouseX, mouseY, pWindow->getMouseScale());
        event.screenPos = { mouseX, mouseY };
        event.wheelDelta = float2(0, 0);
        pWindow->mpCallbacks->handleMouseEvent(event);
    }
}





Add Discussion as Guest

Log in to DocsForge