SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GetMousePositionImpl()

std::pair< float, float > Spices::WindowsInput::GetMousePositionImpl ( )
overrideprotectedvirtual

Query Mouse Position in Windows.

Returns
Returns the pair of Mouse Position in Windows.

Get GLFW Window Pointer.

Query GLFW Window Cursor Position.

Get GLFW Window Pointer.

Query GLFW Window Cursor Position.

Implements Spices::Input.

Definition at line 54 of file WindowsInput.cpp.

55 {
57
61 const auto window = VulkanRenderBackend::GetState().m_Windows;
62
66 double xPos, yPos;
67 glfwGetCursorPos(window, &xPos, &yPos);
68
69 return { static_cast<float>(xPos), static_cast<float>(yPos) };
70 }
#define SPICES_PROFILE_ZONE
static VulkanState & GetState()
Get VulkanState in use.
GLFWwindow * m_Windows
Definition VulkanUtils.h:92

References Spices::VulkanRenderBackend::GetState().