I have written a small application using OpenGL, and have implemented some rudimentary camera controls. Unfortunately, I cannot get the application to set my cursor position correctly. The cursor is never set to where I tell it to go, so my application just reacts to where the cursor is on my entire screen.
I first attempted to use GLFW, and when I saw that I couldn't set the cursor appropriately, I decided to try SFML. Neither one works.
I'm on an Arch Linux install with a Gnome desktop. I've been trying to figure this out for a few days now to no avail.
The relevant code is as follows:
sf::Vector2i cursor_pos = sf::Mouse::getPosition(*window); sf::Mouse::setPosition(sf::Vector2i(1280/2, 720/2), *window);
This gets called every frame inside a function that messes with some matrices.
I also set the cursor position at initialization.
Any hints or advice would be greatly appreciated.