Understand how visual effects are possible on Mac

Today I was talking with a friend about OpenGL 4 API and how things changed. For example, glBegin and glEnd are deprecated, the fixed function pipeline was removed and we need to do all the processing with shaders (maybe I was a little bit exaggerated).

The question we raise was about how modern games (like Portal 2 and Assassins Creed) run on Mac OSX. Since Mac only suport GLSL 1.1 (more about this on this post and this post ). I think (and maybe I’m wrong on that part) that these modern games use a newer version of GLSL, doing so will not prevent theses games to run on Mac? The shaders needs to be rewritten in order to run on MacOS?

There is some OpenGL extension that allows one to use newer GLSL functionalities in MacOS?

Currently, MacOSX only supports OpenGL 2.1, which means GLSL 1.20. There are a number of extensions that Mac OSX supports that brings their level of functionality towards 3.x. EXT_gpu_shader4, ARB_geometry_shader4, and several others. Apple publishes a comprehensive feature matrix for what extensions each graphics card supports.

The main issue is that the 3.x versions of this functionality are in many cases different from what MacOSX supports. ARB_geometry_shader4 is nothing like the core geometry shader functionality. They use entirely different APIs for various things. For example, in the ARB extension version, the input and output primitive types are set by the user in C/C++ code. In the core functionality, they are set in the shader. This represents a recent shift in the ARB towards putting more features in the shader (see ARB_explicit_attrib_location).

All of the extensions MacOS X supports are also supported on Windows. So if you write your code on MacOS X, it will work on Windows and Linux.

The other thing is that MacOS X does not expose any OpenGL 4.x level features. Not even through extensions. So no tessellation at all. Even though Macs use plenty of 4.x-capable hardware.

As I understand it, the next version of MacOSX will upgrade the OpenGL implementation to 3.2 or thereabouts, hopefully including some 4.x extensions. Why 3.2 and not 3.3? No idea.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.