GLFW window creation options affecting the HarfBuzz

sho*_*mit 4 opengl glsl freetype glfw harfbuzz

I am using HarfBuzz along with freetype to render regional language hindi.

If I write these three optins for window creation than the font does not render and I only see the blank screen.

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
Run Code Online (Sandbox Code Playgroud)

Without these three options the font renders correctly.

I am curious to know what difference these options make in window creation?

Rab*_*d76 5

那是因为您创建了一个核心配置文件OpenGL上下文GLFW_OPENGL_CORE_PROFILE)。
GLFW_OPENGL_COMPAT_PROFILE默认情况下的兼容性配置文件上下文()相比,旧版OpenGL OpenGL指令无效,并会导致OpenGL错误。

主要区别在于,您不能使用glBegin/glEnd序列,固定功能属性(例如glVertexPointer)或客户端功能或当前的矩阵堆栈。
如果要绘制几何图形,则必须创建“ 顶点阵列对象”并使用Shader程序。

可以在OpenGL 3.3兼容性配置文件规范或最新的OpenGL版本OpenGL 4.6 API兼容性配置文件规范中看到完整的差异,其中仅在兼容性配置文件规范中而不在核心规范中的功能以橙色排版。