Jump to content


Why is MacOS and games only detecting OpenGL 2.1?

OpenGL

  • Please log in to reply
10 replies to this topic

#1 kelliegator

kelliegator

    Newbie

  • Members
  • 6 posts
  • Location:Sweden

Posted 09 August 2016 - 02:42 PM

I'm new and not super technical but have tried to do some research and I'm genuinely curious about how OpenGL works on my OS, exactly.

When I check my OpenGL version on terminal (using glxinfo | grep "OpenGL version") it says my Mac is only using OpenGL 2.1.

I'm told the same thing when running various source ports for Doom and Quake and check the OpenGL version.

The OpenGL extensions viewer on the Mac App Store, though, says my computer supports OpenGL 4.1, so why isn't any of my games using OpenGL versions higher than 2.1?

When I play FTE Quakeworld on Windows it also says my MacBook Pro uses OpenGL 4.3, which is weird when the same Quake source port on MacOS only uses 2.1.

Anyone know why this is, and if it's possible to make any source ports or games run on OpenGL versions higher than 2.1 on OS X?

I have a late 2013, 13 inch Macbook Pro, for those who are curious.

#2 Sneaky Snake

Sneaky Snake

    Official Mascot of the 1988 Winter Olympics

  • IMG Writers
  • 3297 posts
  • Steam Name:SneakySnake
  • Steam ID:sneaky_snake
  • Location:Waterloo, Canada

Posted 09 August 2016 - 06:53 PM

Might just be faulty reporting. OS X does support up to 4.1 or so now, although it isn't a complete OpenGL set. They have some custom tweaks.


What version of OS X are you running?
2015 13" rMBP: i5 5257U @ 2.7 GHz || Intel Iris 6100 || 8 GB LPDDR3 1866 || 256 GB SSD || macOS Sierra
Gaming Build: R5 1600 @ 3.9 GHz || Asus GTX 1070 8 GB || 16 GB DDR4 3000 || 960 Evo NVMe, 1 TB FireCuda || Win10 Pro
Other: Dell OptiPlex 3040 as VMware host || QNAP TS-228 NAS || iPhone 6S 64GB

#3 Janichsan

Janichsan

    Jugger Bugger

  • Forum Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 8075 posts
  • Steam Name:Janichsan
  • Location:over there

Posted 10 August 2016 - 12:35 AM

There are two different so called "profiles" of OpenGL: Core and Compatibility. You can also switch between them in the OpenGL Extension Viewer.

"Core" is the more advanced version, i.e. OpenGL 4.1 under OS X, and only available in Cocoa applications, and even then only when they are specifically written to use it. "Compatibility" is in fact only OpenGL 2.1, but can also be used by older (Carbon) and X Windows applications (the latter is the reason why glxinfo only reports OpenGL 2.1: GLX is the OpenGL API for X Windows).

"We do what we must, because we can."
"Gaming on a Mac is like women on the internet." — "Highly common and totally awesome?"


#4 kelliegator

kelliegator

    Newbie

  • Members
  • 6 posts
  • Location:Sweden

Posted 10 August 2016 - 01:24 AM

View PostSneaky Snake, on 09 August 2016 - 06:53 PM, said:

Might just be faulty reporting. OS X does support up to 4.1 or so now, although it isn't a complete OpenGL set. They have some custom tweaks.


What version of OS X are you running?
Well, currently I'm running the public beta for Mac OS Sierra. Before that I was running El Capitan.

View PostJanichsan, on 10 August 2016 - 12:35 AM, said:

There are two different so called "profiles" of OpenGL: Core and Compatibility. You can also switch between them in the OpenGL Extension Viewer.

"Core" is the more advanced version, i.e. OpenGL 4.1 under OS X, and only available in Cocoa applications, and even then only when they are specifically written to use it. "Compatibility" is in fact only OpenGL 2.1, but can also be used by older (Carbon) and X Windows applications (the latter is the reason why glxinfo only reports OpenGL 2.1: GLX is the OpenGL API for X Windows).
So if I get this straight, 4.1 is only used for Cocoa applications when written specifically to use OpenGL 4.1?

Thanks for clarifying. But I find it a bit odd that Mac only uses OpenGL versions higher than 2.1 on special occasions and not Windows 10 (the version of Windows I'm using).

#5 Janichsan

Janichsan

    Jugger Bugger

  • Forum Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 8075 posts
  • Steam Name:Janichsan
  • Location:over there

Posted 10 August 2016 - 01:35 AM

View Postkelliegator, on 10 August 2016 - 01:24 AM, said:

So if I get this straight, 4.1 is only used for Cocoa applications when written specifically to use OpenGL 4.1?
Correct. When setting up an OpenGL context, you have to pick one of the two profiles.

Quote

Thanks for clarifying. But I find it a bit odd that Mac only uses OpenGL versions higher than 2.1 on special occasions and not Windows 10 (the version of Windows I'm using).
I can't comment on what FTE QW does differently under Windows compared to under OS X, but in theory, you should be able to find Windows applications that also only report using OpenGL 2.1: these two profiles are not just some Mac specific quirk, but a basic design feature of OpenGL, since the Core profile is not completely backwards compatible to older OpenGL versions.

(EDIT) The difference between OS X and Windows is, though, that OS X has (as mentioned) two different OpenGL APIs – the older AGL and the newer CGL (three counting GLX) – while Windows only has one: WGL.

"We do what we must, because we can."
"Gaming on a Mac is like women on the internet." — "Highly common and totally awesome?"


#6 kelliegator

kelliegator

    Newbie

  • Members
  • 6 posts
  • Location:Sweden

Posted 10 August 2016 - 01:43 AM

View PostJanichsan, on 10 August 2016 - 01:35 AM, said:

Correct. When setting up an OpenGL context, you have to pick one of the two profiles.
So if I pick one of those profiles, my mac will run apps over OpenGL 2.1?

'cause if that's supposed to be the case it's not working. Might be something wrong with this beta of Sierra I'm using if that's the case.

#7 Janichsan

Janichsan

    Jugger Bugger

  • Forum Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 8075 posts
  • Steam Name:Janichsan
  • Location:over there

Posted 10 August 2016 - 01:50 AM

View Postkelliegator, on 10 August 2016 - 01:43 AM, said:

So if I pick one of those profiles, my mac will run apps over OpenGL 2.1?

'cause if that's supposed to be the case it's not working. Might be something wrong with this beta of Sierra I'm using if that's the case.
:huh: Explain. I don't think I understand what you mean.

Maybe to clarify: you as a user cannot pick anything. The choice whether the Core or the Compatibility profile is used is made by the developer in the source code.

"We do what we must, because we can."
"Gaming on a Mac is like women on the internet." — "Highly common and totally awesome?"


#8 kelliegator

kelliegator

    Newbie

  • Members
  • 6 posts
  • Location:Sweden

Posted 10 August 2016 - 01:55 AM

View PostJanichsan, on 10 August 2016 - 01:50 AM, said:

:huh: Explain. I don't think I understand what you mean.

Maybe to clarify: you as a user cannot pick anything. The choice whether the Core or the Compatibility profile is used is made by the developer in the source code.
Well, that answers my question. Thanks.

I'm sorry if I ask too much but what would one have to write in the source code to use the core profile?

#9 Janichsan

Janichsan

    Jugger Bugger

  • Forum Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 8075 posts
  • Steam Name:Janichsan
  • Location:over there

Posted 10 August 2016 - 03:52 AM

View Postkelliegator, on 10 August 2016 - 01:55 AM, said:

I'm sorry if I ask too much but what would one have to write in the source code to use the core profile?
Migrating existing legacy OpenGL code to the Core profile is a bit complex, since it requires quite a bunch of changes. Apple has an in-depth guide for that.

"We do what we must, because we can."
"Gaming on a Mac is like women on the internet." — "Highly common and totally awesome?"


#10 kelliegator

kelliegator

    Newbie

  • Members
  • 6 posts
  • Location:Sweden

Posted 10 August 2016 - 04:40 AM

View PostJanichsan, on 10 August 2016 - 03:52 AM, said:

Migrating existing legacy OpenGL code to the Core profile is a bit complex, since it requires quite a bunch of changes. Apple has an in-depth guide for that.
Hmm, a bit too complex for me but interesting nonetheless. Thanks.

Is there a list or any kind of knowledge about which Mac games out there utilise higher OpenGL versions (and a bit off-topic but do we know what games use the Metal API too, for that matter)?

#11 Janichsan

Janichsan

    Jugger Bugger

  • Forum Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 8075 posts
  • Steam Name:Janichsan
  • Location:over there

Posted 10 August 2016 - 04:55 AM

View Postkelliegator, on 10 August 2016 - 04:40 AM, said:

Is there a list or any kind of knowledge about which Mac games out there utilise higher OpenGL versions (and a bit off-topic but do we know what games use the Metal API too, for that matter)?
OpenGL Core: pretty much every Mac game released since 2011 that requires OS X Lion or above.

Metal? None.

"We do what we must, because we can."
"Gaming on a Mac is like women on the internet." — "Highly common and totally awesome?"






Also tagged with one or more of these keywords: OpenGL