Hey everyone.
I've used SFML to write some simple games, get my head around 2D graphics and basic game development techniques for a while now, but I wanted more than just 3D so I started learning OpenGL.
In this OpenGL tutorial there is a library called GLFW being used for cross-platform window managment, input and etc.
It's a great library, but since SFML can be used with OpenGL and i know SFML much better well I wanted to see how it does compared to GLFW.
I have everything up and running, but the thing that bothers is the mouse.
The problem arises when I'm constructing the view matrix.
In GLFW there is a function to lock the mouse inside the window, so that i can't leave the window, but I can still move the mouse freely inside the world, I don't "hit" (mouse doesn't get blocked) borders of the window.
But in SFML the mouse simply leaves the window, goes as far as it can go and just stops. It drives me crazy, because it doesn't allow me to rotate freely inside the world.
Think of an FPS game where you can rotate only as much, as your screen allows you
.
So, what is the way around this? How to lock mouse inside "world" with SFML? I really liked SFML and I wanted to use it for some kind of GUI in the game or something like that.