I tried to create a Window with GLFW an then Center it on the Screen with glfwSetWindowPos().
But unfortunately I’m not able to get the current size of my Desktop Screen, to center my window.
Is there a functino for it, or another way to do it?
I think something like this might work. Remember to Pre-define the window.
// Defining a monitor
GLFWmonitor* monitor = glfwGetPrimaryMonitor();
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
// Putting it in the centre
glfwSetWindowPos(window, mode->width/7, mode->height/7);
You may need to play around with the values but Im sure you’ll get it!