OpenGL Capabilities - Mac OS El Capitan

Started by advanced_set, October 23, 2015, 12:53:06

Previous topic - Next topic

advanced_set

Hello Guys,

I was playing with lwjgl today and got the error "This functionality is not available." when calling "GL30.glGenVertexArrays()" .

Indeed, until recently Mac OS X would only support OpenGL 2.1. However, after updating to El Capitan my computer reports to me that it now supports OpenGL 4.1 (I used an application called OpenGL Extension Viewer to check this).

(MacBook Retina late 2012, Graphics: Intel Iris, OpenGL Version: 4.1 INTEL-10.8.77)

I am a bit confused. Isn't this function a core function?

Do lwjgl bindings have access to the latest functionalities on Mac OS X El Capitan?







Kai

On OS X one has to (and always had to) explicitly request a core context. Otherwise one would get an "old" 2.1 context.

LWJGL3:
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);


LWJGL2:
PixelFormat pixelFormat = new PixelFormat();
ContextAttribs contextAtrributes = new ContextAttribs(4, 1)
    .withForwardCompatible(true)
    .withProfileCore(true);
Display.create(pixelFormat, contextAtrributes);

advanced_set