Browse Source

GL3 backend: Set forward compatibility flag to fix running on macOS (#522)

NaLiJa 2 years ago
parent
commit
1d9b651a63
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Backends/RmlUi_Backend_GLFW_GL3.cpp

+ 2 - 0
Backends/RmlUi_Backend_GLFW_GL3.cpp

@@ -84,6 +84,8 @@ bool Backend::Initialize(const char* name, int width, int height, bool allow_res
 	glfwWindowHint(GLFW_RESIZABLE, allow_resize ? GLFW_TRUE : GLFW_FALSE);
 	glfwWindowHint(GLFW_RESIZABLE, allow_resize ? GLFW_TRUE : GLFW_FALSE);
 	glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);
 	glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);
 
 
+    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
+
 	GLFWwindow* window = glfwCreateWindow(width, height, name, nullptr, nullptr);
 	GLFWwindow* window = glfwCreateWindow(width, height, name, nullptr, nullptr);
 	if (!window)
 	if (!window)
 		return false;
 		return false;