0

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.

Sam Claus
  • 1,807
  • 23
  • 39

1 Answers1

3

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

You have to explicitely 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 moder GL versions at all). This means that on OSX, you never can mix old, deprecated GL featuers 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.

derhass
  • 43,833
  • 2
  • 57
  • 78
  • Yeah that's what the other article said. But now I have another issue. If I try to enable modern OpenGL, GLFW just fails to create the window--which I assume means it isn't supported. – Sam Claus Oct 05 '15 at 21:44
  • IIRC, you also have to set the foreard compatibility bit on OSX, but I'm not sure. – derhass Oct 05 '15 at 21:53
  • Yes, OS X only support forward-compatible core profiles. – Ken Thomases Oct 05 '15 at 22:25