I’ve had a few of my testers try out the mac build of my game and it always seemed to crash on startup because one of my shaders used only a glsl150 technique with no fallback.
It was odd though since the testers’ gpus support even opengl 4.5 and should compile the shader just fine. But then I found this on stackoverflow:
MacOS uses Legacy Profile as default for all created OpenGL context. Therefor by default only OpenGL up to 2.1 and GLSL up to 1.20 is supported.
So apparently osx can’t compile glsl150 out of the box? Is there a guy at Apple that implemented this saying, “Yes this seems like an excellent idea!”.
I looked at some old threads and some people suggested that this line could force macs to use the Core Profile:
Apparently that just forces all shaders into glsl150 mode and crashes the glsl110 only shaders claiming they’re deprecated.
So yes, the obvious solution is to write fallbacks on the crashing shader for glsl110 but I’m just wondering if there’s any sort of way to enable dynamic opengl switching on macs?
Also in reality are there any medium range gpus left that don’t support opengl3.2? I feel like for the amount of power that my game needs I wouldn’t even need to write 110 fallbacks at all and just use 150.
Yeah by default, that’s what you get I suppose. It’s ironic how a company that claims to pride itself on design won’t even make one of the main three graphics libs run properly. Perhaps they didn’t have enough courage to let people use the new versions.
Here’s the stackoverflow thread btw. The guy answering is being kind of vague on how to get this working, but from what I can tell you need to set a command parameter on launch. Or something.
Since the last years OSX support OpenGL 4.1.
The drivers are decent, but not good and they always lag behind the sepc several years
Take note though that the 4.1 and OpenGL 3.3 suppoprt are only core profile. Many libraries (jME also?) requests compatibility profiles you won’t get access to the newer versions.
I have not had any problems accessing 3.3 or 4.1 features when requesting core profiles.