Hi,
So I recently moved from LWJGL 2.9.3 to LWJGL 3 and I'm getting a pretty annoying error:
[LWJGL] GLFW_API_UNAVAILABLE error
Description : WGL: The driver does not appear to support OpenGL
Stacktrace :
org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1484)
org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1637)
com.genesis2d.graphics.Window.create(Window.java:88)
com.genesis2d.core.Engine.run(Engine.java:49)
java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-0" java.lang.RuntimeException: Failed to create window
at com.genesis2d.graphics.Window.create(Window.java:90)
at com.genesis2d.core.Engine.run(Engine.java:49)
at java.lang.Thread.run(Unknown Source)
I know this same issue has been reported here, but most of the posts didn't help me because the solution was a simple driver update. That's not the case here.
My GC does support OpenGL (3.1), the drivers are updated (at least Windows says they are), and the same code worked for LWJGL 2.9.3.
As you can see it's Intel HD Graphics 2000, but It actually has a pretty decent performance with modern OpenGL.
This is the window creation code:
if (!glfwInit()) {
throw new IllegalStateException("Unable to initialize GLFW");
}
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
glfwWindowHint(GLFW_SAMPLES, 8);
glfwWindowHint(GLFW_RED_BITS, 8);
glfwWindowHint(GLFW_GREEN_BITS, 8);
glfwWindowHint(GLFW_BLUE_BITS, 8);
glfwWindowHint(GLFW_ALPHA_BITS, 8);
window = glfwCreateWindow(width, height, title, 0, 0);
if (window == 0) {
throw new RuntimeException("Failed to create window");
}
glfwMakeContextCurrent(window);
GL.createCapabilities();
glfwShowWindow(window);
I've made some tests with C++ and GLFW and the same code works flawlessly...
Thanks for your help in advance