Hello,
Firstly, I am very new to LWJGL so I apologise if this is "obvious", but I didn't find an answer either on or off the forum.
When creating a window using GLFW, I'm trying to set window hints to request a minimum version of OpenGL. For my purposes I requested version 4.3 like so:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4)
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3)
After creating a window, I check the OpenGL version with:
glGetString(GL_VERSION)
It shows that the version is set correctly, but nothing is drawn. The clear colour is applied, but my geometry isn't rendered. I'm using features that require GLSL version 430. If I remove the window hints, it defaults to OpenGL 4.6 and draws perfectly. However, if I then request 4.6 through window hints, nothing is drawn. I am really confused, since it seems to be the process of hinting that is causing me issues.
I've tried several versions and the results are interesting:
Hinted Version | Actual Version | Drawn |
(none) | 4.6 | Yes |
4.6 | 4.6 | No |
4.3 | 4.3 | No |
3.1 | 3.1 | Yes |
3.0 | 4.6 | Yes |
2.1 | 4.6 | Yes |
I also checked the version of GLFW and it says 3.4.0. Is this a pre-release/beta of the next GLFW version? It seems that 3.3.3 is the current. I'm using Kotlin with gradle and LWJGL version 3.2.3, if that helps.
This could just be a really newbie mistake that I just can't spot, but it seems strange to me that hinting causes OpenGL to not draw. If anyone has come across this before, or can point me in the right direction, I would really appreciate it. Thanks for your time!
