Sam Claus
Sam Claus

Reputation: 1989

Why does my Mac only support OpenGL 2.1?

I'm currently learning OpenGL using LWJGL 3, which uses GLFW for windows. I'm using a 2015 MacBook Pro with an AMD M370X running Yosemite. The issue is, I'm using modern OpenGL (3.30), and for some reason it's not supported. I used glGetString(GL_VERSION) and apparently the computer is using a driver from ATI that only supports up to OpenGL 2.1.

Upvotes: -1

Views: 1752

Answers (1)

derhass
derhass

Reputation: 45352

OSX supports modern GL only in core profile (which is the only profile required to be supported, by the OpenGL specification).

You have to explicitly request this when creating the context, otherwise it will fall back to a legacy context implementing GL 2.1 (for compatibility with old applications which do not know about profiles or modern GL versions at all). This means that on OSX, you never can mix old, deprecated GL features with modern features (as you could do with a compatibility profile). If this is a good or a bad thing depends on the point of view, though.

For GLFW, you will have to use glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE) and request a GL version >= 3.2.

Upvotes: 3

Related Questions