#version 330 和#version 330 核心有什么区别?

What are the differences between #version 330 and #version 330 core?

#version 330#version 330 core 有什么区别?

core重要吗?

这两个版本声明是等价的。 core 是默认值。来自 GLSL 3.30 规范:

If no profile argument is provided, the default is core.

这意味着:

#version 330

等同于:

#version 330 core

如果您想使用兼容性配置文件,您需要明确指定:

#version 330 compatibility

我建议阅读以下内容: https://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts