Hello Guest

LWJGL3 runs "wrong" OpenGL version [newbe][SOLVED]

  • 2 Replies
  • 4995 Views
LWJGL3 runs "wrong" OpenGL version [newbe][SOLVED]
« on: June 21, 2016, 11:03:13 »
Hey,
I'm pretty new to programing with LWJGL. To begin working, I wanted to check which version of OpenGL LWJGL3 is running.
I used
Code: [Select]
GL11.glGetString(GL11.GL_VERSION) and found out that I was running
Code: [Select]
2.1 INTEL-10.14.58My MacBook Pro however is supporting OpenGL version 4.1 according to Apple's Website.
I recognized the issue when trying to specify a
Code: [Select]
#version 410 in the fragment shader which gave me an error, that the version was not supported.

Now my question is: Is it possible to manually define version that LWJGL is using?
(I tried the way it was described on the wiki http://wiki.lwjgl.org/wiki/Version_selection, but it did not work for me)

Thanks already in advance!

String ;)
« Last Edit: June 21, 2016, 22:50:32 by string111 »

*

Kai

Re: LWJGL3 runs "wrong" OpenGL version [newbe]
« Reply #1 on: June 21, 2016, 11:12:26 »
See: http://www.glfw.org/faq.html#how-do-i-create-an-opengl-30-context

Also: The wiki page you referenced is outdated and belongs to LWJGL 2.x

Re: LWJGL3 runs "wrong" OpenGL version [newbe]
« Reply #2 on: June 21, 2016, 22:50:14 »
Worked fine for me. Thanks!

For any reader who has the same problem, you have to insert the glfw context lines before you ceate the window via glfwCreateWindow();!!!