OpenGL Core 是一种后端,能够在 Windows、macOS 和 Linux 上支持最新的 OpenGL 功能。根据 OpenGL 驱动程序支持情况,其版本范围从 OpenGL 3.2 到 OpenGL 4.5。
有关如何在编辑器或独立播放器中将 OpenGL Core 启用为默认图形 API 的信息,请参阅覆盖默认图形 API。
OpenGL Core 具有以下最低要求
macOS 10.8(OpenGL 3.2)、macOS 10.9(OpenGL 3.2 至 4.1)
Windows,NVIDIA 自 2006 年起(GeForce 8)、AMD 自 2006 年起(Radeon HD 2000)、Intel 自 2012 年起(HD 4000 / IvyBridge)(OpenGL 3.2 至 OpenGL 4.5)
Linux(OpenGL 3.2 至 OpenGL 4.5)
编辑器和独立播放器的 macOS OpenGL 后端支持 OpenGL 3.x 和 4.x 功能,例如细分和几何着色器在 GPU 上运行的程序。 更多信息
参见术语表。
但是,由于 Apple 将 OS X 桌面上的 OpenGL 版本限制为最多 4.1,因此它不支持所有 DirectX 11 功能(例如无序访问视图或计算着色器)。这意味着所有配置为针对着色器级别 5.0(使用#pragma target 50
)的着色器都无法在 OS X 上加载。
因此,引入了一个新的着色器目标级别:#pragma target gl4.1
。此目标级别至少需要 OpenGL 4.1 或 DirectX 11.0 着色器级别 5(在桌面上),或 OpenGL ES 3.1 + Android 扩展包(在移动设备上)。
新的 OpenGL 后端引入了许多新功能(以前主要仅限于 DX11/GLES3)
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.