I feel so dumb. Thanks that works but now occurs another problem.
It seems that I don't get the core profile that I request through GLFW.
My window hints are these:
GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3
GLFW.GLFW_CONTEXT_VERSION_MINOR, 2
GLFW.GLFW_OPENGL_PROFILE, GLFW.GLFW_OPENGL_CORE_PROFILE
GLFW.GLFW_OPENGL_FORWARD_COMPAT, GLFW.GLFW_TRUE
Then i check the version with GL11
GL.createCapabilities();
System.err.println("OpenGL version: " + GL11.glGetString(GL11.GL_VERSION));
System.err.println("Device: " + GL11.glGetString(GL11.GL_RENDERER));
It returns the 4.1 on Mac
OpenGL version: 4.1 INTEL-12.9.22
Device: Intel(R) Iris(TM) Graphics 6100
On windows it returns
OpenGL version: 3.2.0 NVIDIA 416.34
Device: GeForce GTX 1080 Ti/PCIe/SSE2
When I try to use the GL Core class on Mac they return null and don't work but on Windows and Linux they work like a charm.
For example this returns null even though the GL11 class returned a proper string
System.err.println("OpenGL version: " + GL32C.glGetString(GL32C.GL_VERSION));
System.err.println("Device: " + GL32C.glGetString(GL32C.GL_RENDERER));
Maybe I am doing something wrong I don't know honestly. For me it looks like it doesn't get the proper OpenGL context.
Update:Those are the supported versions returned by GL.createCapabilities()
1.1 true
1.2 true
1.3 true
1.4 true
1.5 true
2.0 true
2.1 true
3.0 true
3.1 true
3.2 true
4.0 true
4.1 true
4.2 false
4.3 false
Also using the GL32C.glCreateShader(type); always returns 0 (shader creation failed). So it probably has to do something with the OpenGL context.
Update 2:Fixed it. I had a static Toolkit.getDefaultToolkit().getScreenResolution() call which starts AWT and kills the context or something like that. That took me a while.