diff --git a/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp b/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp index f465042..cd823c0 100644 --- a/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp +++ b/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp @@ -41,6 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + // glfw window creation // -------------------- GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL); @@ -362,4 +366,4 @@ unsigned int loadTexture(char const * path) } return textureID; -} \ No newline at end of file +} diff --git a/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp b/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp index b5b1e9b..bf5c55f 100644 --- a/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp +++ b/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp @@ -44,6 +44,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + // glfw window creation // -------------------- GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL); @@ -363,4 +367,4 @@ unsigned int loadTexture(char const * path) } return textureID; -} \ No newline at end of file +} diff --git a/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp b/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp index fa6d76c..a10cd33 100644 --- a/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp +++ b/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp @@ -41,6 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + // glfw window creation // -------------------- GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL); @@ -364,4 +368,4 @@ unsigned int loadTexture(char const * path) } return textureID; -} \ No newline at end of file +} diff --git a/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp b/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp index ced5392..c939e7d 100644 --- a/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp +++ b/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp @@ -41,6 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + // glfw window creation // -------------------- GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL); @@ -364,4 +368,4 @@ unsigned int loadTexture(char const * path) } return textureID; -} \ No newline at end of file +} diff --git a/src/2.lighting/6.multiple_lights/multiple_lights.cpp b/src/2.lighting/6.multiple_lights/multiple_lights.cpp index 22f5abe..9f319d8 100644 --- a/src/2.lighting/6.multiple_lights/multiple_lights.cpp +++ b/src/2.lighting/6.multiple_lights/multiple_lights.cpp @@ -44,6 +44,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + // glfw window creation // -------------------- GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL); @@ -417,4 +421,4 @@ unsigned int loadTexture(char const * path) } return textureID; -} \ No newline at end of file +}