Mac OS 10.8 supports GLSL 3.30?

元气小坏坏 提交于 2019-12-03 11:43:10

问题


I'm following the arcsynthesis tutorials on OpenGL 3.3 using 10.8 Mountain Lion and when building the project it compiles and runs the shaders using GLSL version 3.30, however even in the core profile on Mac OS 10.8 I shouldn't have GLSL 3.30 support - only 1.50 (as highlighted in the picture)

Is anybody able to explain how I have managed to achieve this black magic?


回答1:


OS X 10.8 still only support OpenGL 3.2, but with some 3.3 features such as specifying attribute location (#extension GL_ARB_explicit_attrib_location : enable). The shader compiler accepts versions up to 4.10. They might have left it there for compatibility or (SPECULATION) they originally intended to support 4.1.

This is at least my conclusion after a few weeks with 10.8.

EDIT: Looks like the 4.10 speculations were spot on. 10.9-10.12 support up to version 4.10. I guess they wanted to spend resources on their Metal api rather than moving forward and get compute shaders in..



来源:https://stackoverflow.com/questions/11964416/mac-os-10-8-supports-glsl-3-30

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!