glfw 实例化 window 位置 before/on 创建

glfw instantiate window position before/on create

在 glfw 中,有什么方法可以在创建 window 之前或期间设置 window 位置?我知道有 glfwSetWindowPos() 但我只能在创建 window 之后调用它并且我的位置发生了快速变化,我正在寻找类似于 glut 的 glutInitWindowPosition() 函数的东西在创建 window 之前调用,以便 window 在给定位置实例化,而无需移动到任何地方。

创建一个隐藏的window(GLFW_VISIBLE),改变位置(glfwSetWindowPos) and show the window (glfwShowWindow)。例如:

glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
GLFWwindow *window = glfwCreateWindow(640, 480, "my window", NULL, NULL);
glfwSetWindowPos(window, 100, 100);
glfwShowWindow(window);