I'm really starting out with LWJGL (I just started) and I focused on one thing: When I create a window and I want to set it as not resizable, I use:
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
window = glfwCreateWindow(WIDTH, HEIGHT, TITLE, NULL, NULL);
However, even if I want to set this after the window was created, I do not know how. I just tried to put the command after the creation of the window, but it won't work:
window = glfwCreateWindow(WIDTH, HEIGHT, TITLE, NULL, NULL);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
So, how I can resolve this?
From the GLFW Window Guide:
Essentially, you set hints like whether the window should be resizable, which context version it has etc. through
glfwWindowHint()
calls. These hints will then be used the next time you create a window withglfwCreateWindow()
. If you set hints after the window has been created, then only new windows created after the call will be affected.Therefore, it is currently not possible to change certain GLFW window properties, like whether it is resizable, after creation.