From 2d16ef0fe2e7da84e52d2a017ba86115ff50803f Mon Sep 17 00:00:00 2001 From: Shivpratap Chauhan Date: Wed, 12 Jul 2017 17:06:00 +0530 Subject: [PATCH] GLFW hint GLFW_OPENGL_FORWARD_COMPAT is must on osx to create glfw window successfully --- src/1.getting_started/1.1.hello_window/hello_window.cpp | 5 ++++- .../1.2.hello_window_clear/hello_window_clear.cpp | 5 ++++- src/1.getting_started/2.1.hello_triangle/hello_triangle.cpp | 5 ++++- .../2.2.hello_triangle_indexed/hello_triangle_indexed.cpp | 5 ++++- .../hello_triangle_exercise1.cpp | 5 ++++- .../hello_triangle_exercise2.cpp | 5 ++++- .../hello_triangle_exercise3.cpp | 5 ++++- .../3.1.shaders_uniform/shaders_uniform.cpp | 5 ++++- .../3.2.shaders_interpolation/shaders_interpolation.cpp | 5 ++++- src/1.getting_started/3.3.shaders_class/shaders_class.cpp | 5 ++++- src/1.getting_started/4.1.textures/textures.cpp | 5 ++++- .../4.2.textures_combined/textures_combined.cpp | 5 ++++- .../4.3.textures_exercise2/textures_exercise2.cpp | 5 ++++- .../4.4.textures_exercise3/textures_exercise3.cpp | 5 ++++- .../4.5.textures_exercise4/textures_exercise4.cpp | 5 ++++- .../5.1.transformations/transformations.cpp | 5 ++++- .../transformations_exercise2.cpp | 5 ++++- .../6.1.coordinate_systems/coordinate_systems.cpp | 5 ++++- .../coordinate_systems_depth.cpp | 5 ++++- .../coordinate_systems_multiple.cpp | 5 ++++- src/1.getting_started/7.1.camera_circle/camera_circle.cpp | 5 ++++- .../7.2.camera_keyboard_dt/camera_keyboard_dt.cpp | 5 ++++- .../7.3.camera_mouse_zoom/camera_mouse_zoom.cpp | 5 ++++- src/1.getting_started/7.4.camera_class/camera_class.cpp | 5 ++++- src/2.lighting/1.colors/colors.cpp | 5 ++++- .../2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp | 5 ++++- .../2.2.basic_lighting_specular/basic_lighting_specular.cpp | 5 ++++- src/2.lighting/3.1.materials/materials.cpp | 5 ++++- .../3.2.materials_exercise1/materials_exercise1.cpp | 5 ++++- .../4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp | 5 ++++- .../lighting_maps_specular.cpp | 5 ++++- .../4.3.lighting_maps_exercise4/lighting_maps_exercise4.cpp | 5 ++++- src/3.model_loading/1.model_loading/model_loading.cpp | 5 ++++- src/4.advanced_opengl/1.1.depth_testing/depth_testing.cpp | 5 ++++- .../1.2.depth_testing_view/depth_testing_view.cpp | 5 ++++- .../10.1.instancing_quads/instancing_quads.cpp | 5 ++++- src/4.advanced_opengl/10.2.asteroids/asteroids.cpp | 5 ++++- .../10.3.asteroids_instanced/asteroids_instanced.cpp | 5 ++++- .../11.anti_aliasing_offscreen/anti_aliasing_offscreen.cpp | 5 ++++- src/4.advanced_opengl/2.stencil_testing/stencil_testing.cpp | 5 ++++- .../3.1.blending_discard/blending_discard.cpp | 5 ++++- src/4.advanced_opengl/3.2.blending_sort/blending_sorted.cpp | 5 ++++- src/4.advanced_opengl/5.1.framebuffers/framebuffers.cpp | 5 ++++- .../5.2.framebuffers_exercise1/framebuffers_exercise1.cpp | 5 ++++- .../6.1.cubemaps_skybox/cubemaps_skybox.cpp | 5 ++++- .../cubemaps_environment_mapping.cpp | 5 ++++- .../8.advanced_glsl_ubo/advanced_glsl_ubo.cpp | 5 ++++- .../9.1.geometry_shader_houses/geometry_shader_houses.cpp | 5 ++++- .../geometry_shader_exploding.cpp | 5 ++++- .../9.3.geometry_shader_normals/normal_visualization.cpp | 5 ++++- .../1.advanced_lighting/advanced_lighting.cpp | 5 ++++- .../2.gamma_correction/gamma_correction.cpp | 5 ++++- .../3.1.1.shadow_mapping_depth/shadow_mapping_depth.cpp | 5 ++++- .../3.1.2.shadow_mapping_base/shadow_mapping_base.cpp | 5 ++++- .../3.1.3.shadow_mapping/shadow_mapping.cpp | 5 ++++- .../3.2.1.point_shadows/point_shadows.cpp | 5 ++++- .../3.2.2.point_shadows_soft/point_shadows_soft.cpp | 5 ++++- src/5.advanced_lighting/3.3.csm/csm.cpp | 5 ++++- src/5.advanced_lighting/4.normal_mapping/normal_mapping.cpp | 5 ++++- .../5.1.parallax_mapping/parallax_mapping.cpp | 5 ++++- .../5.2.steep_parallax_mapping/steep_parallax_mapping.cpp | 5 ++++- .../parallax_occlusion_mapping.cpp | 5 ++++- src/5.advanced_lighting/6.hdr/hdr.cpp | 5 ++++- src/5.advanced_lighting/7.bloom/bloom.cpp | 5 ++++- .../8.1.deferred_shading/deferred_shading.cpp | 5 ++++- .../deferred_shading_volumes.cpp | 5 ++++- src/5.advanced_lighting/9.ssao/ssao.cpp | 5 ++++- src/6.pbr/1.1.lighting/lighting.cpp | 5 ++++- src/6.pbr/1.2.lighting_textured/lighting_textured.cpp | 5 ++++- .../ibl_irradiance_conversion.cpp | 5 ++++- src/6.pbr/2.1.2.ibl_irradiance/ibl_irradiance.cpp | 5 ++++- src/6.pbr/2.2.1.ibl_specular/ibl_specular.cpp | 5 ++++- .../2.2.2.ibl_specular_textured/ibl_specular_textured.cpp | 5 ++++- src/7.in_practice/1.debugging/debugging.cpp | 5 ++++- 74 files changed, 296 insertions(+), 74 deletions(-) diff --git a/src/1.getting_started/1.1.hello_window/hello_window.cpp b/src/1.getting_started/1.1.hello_window/hello_window.cpp index db708c9..f82a9e1 100644 --- a/src/1.getting_started/1.1.hello_window/hello_window.cpp +++ b/src/1.getting_started/1.1.hello_window/hello_window.cpp @@ -18,7 +18,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/1.2.hello_window_clear/hello_window_clear.cpp b/src/1.getting_started/1.2.hello_window_clear/hello_window_clear.cpp index 39daa0f..0294d4b 100644 --- a/src/1.getting_started/1.2.hello_window_clear/hello_window_clear.cpp +++ b/src/1.getting_started/1.2.hello_window_clear/hello_window_clear.cpp @@ -18,7 +18,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/2.1.hello_triangle/hello_triangle.cpp b/src/1.getting_started/2.1.hello_triangle/hello_triangle.cpp index 4b5a1fd..dc97a51 100644 --- a/src/1.getting_started/2.1.hello_triangle/hello_triangle.cpp +++ b/src/1.getting_started/2.1.hello_triangle/hello_triangle.cpp @@ -31,7 +31,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/2.2.hello_triangle_indexed/hello_triangle_indexed.cpp b/src/1.getting_started/2.2.hello_triangle_indexed/hello_triangle_indexed.cpp index 486c269..82a82e9 100644 --- a/src/1.getting_started/2.2.hello_triangle_indexed/hello_triangle_indexed.cpp +++ b/src/1.getting_started/2.2.hello_triangle_indexed/hello_triangle_indexed.cpp @@ -31,7 +31,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/2.3.hello_triangle_exercise1/hello_triangle_exercise1.cpp b/src/1.getting_started/2.3.hello_triangle_exercise1/hello_triangle_exercise1.cpp index 2524cb6..03373ef 100644 --- a/src/1.getting_started/2.3.hello_triangle_exercise1/hello_triangle_exercise1.cpp +++ b/src/1.getting_started/2.3.hello_triangle_exercise1/hello_triangle_exercise1.cpp @@ -31,7 +31,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/2.4.hello_triangle_exercise2/hello_triangle_exercise2.cpp b/src/1.getting_started/2.4.hello_triangle_exercise2/hello_triangle_exercise2.cpp index a51dd50..c23de3b 100644 --- a/src/1.getting_started/2.4.hello_triangle_exercise2/hello_triangle_exercise2.cpp +++ b/src/1.getting_started/2.4.hello_triangle_exercise2/hello_triangle_exercise2.cpp @@ -31,7 +31,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/2.5.hello_triangle_exercise3/hello_triangle_exercise3.cpp b/src/1.getting_started/2.5.hello_triangle_exercise3/hello_triangle_exercise3.cpp index 45af9ee..a208ab3 100644 --- a/src/1.getting_started/2.5.hello_triangle_exercise3/hello_triangle_exercise3.cpp +++ b/src/1.getting_started/2.5.hello_triangle_exercise3/hello_triangle_exercise3.cpp @@ -38,7 +38,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/3.1.shaders_uniform/shaders_uniform.cpp b/src/1.getting_started/3.1.shaders_uniform/shaders_uniform.cpp index 3f799c7..aaea260 100644 --- a/src/1.getting_started/3.1.shaders_uniform/shaders_uniform.cpp +++ b/src/1.getting_started/3.1.shaders_uniform/shaders_uniform.cpp @@ -34,7 +34,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/3.2.shaders_interpolation/shaders_interpolation.cpp b/src/1.getting_started/3.2.shaders_interpolation/shaders_interpolation.cpp index 8d2db9c..2805771 100644 --- a/src/1.getting_started/3.2.shaders_interpolation/shaders_interpolation.cpp +++ b/src/1.getting_started/3.2.shaders_interpolation/shaders_interpolation.cpp @@ -36,7 +36,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/3.3.shaders_class/shaders_class.cpp b/src/1.getting_started/3.3.shaders_class/shaders_class.cpp index d756da0..f327127 100644 --- a/src/1.getting_started/3.3.shaders_class/shaders_class.cpp +++ b/src/1.getting_started/3.3.shaders_class/shaders_class.cpp @@ -20,7 +20,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/4.1.textures/textures.cpp b/src/1.getting_started/4.1.textures/textures.cpp index 295b766..d4f709a 100644 --- a/src/1.getting_started/4.1.textures/textures.cpp +++ b/src/1.getting_started/4.1.textures/textures.cpp @@ -22,7 +22,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/4.2.textures_combined/textures_combined.cpp b/src/1.getting_started/4.2.textures_combined/textures_combined.cpp index 3a04a3e..05ccf4d 100644 --- a/src/1.getting_started/4.2.textures_combined/textures_combined.cpp +++ b/src/1.getting_started/4.2.textures_combined/textures_combined.cpp @@ -22,7 +22,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/4.3.textures_exercise2/textures_exercise2.cpp b/src/1.getting_started/4.3.textures_exercise2/textures_exercise2.cpp index d4a5d2a..494822b 100644 --- a/src/1.getting_started/4.3.textures_exercise2/textures_exercise2.cpp +++ b/src/1.getting_started/4.3.textures_exercise2/textures_exercise2.cpp @@ -22,7 +22,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/4.4.textures_exercise3/textures_exercise3.cpp b/src/1.getting_started/4.4.textures_exercise3/textures_exercise3.cpp index 53aeb85..087d26d 100644 --- a/src/1.getting_started/4.4.textures_exercise3/textures_exercise3.cpp +++ b/src/1.getting_started/4.4.textures_exercise3/textures_exercise3.cpp @@ -22,7 +22,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/4.5.textures_exercise4/textures_exercise4.cpp b/src/1.getting_started/4.5.textures_exercise4/textures_exercise4.cpp index 9359e85..dbc088c 100644 --- a/src/1.getting_started/4.5.textures_exercise4/textures_exercise4.cpp +++ b/src/1.getting_started/4.5.textures_exercise4/textures_exercise4.cpp @@ -25,7 +25,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/5.1.transformations/transformations.cpp b/src/1.getting_started/5.1.transformations/transformations.cpp index 6f72710..e760661 100644 --- a/src/1.getting_started/5.1.transformations/transformations.cpp +++ b/src/1.getting_started/5.1.transformations/transformations.cpp @@ -26,7 +26,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/5.2.transformations_exercise2/transformations_exercise2.cpp b/src/1.getting_started/5.2.transformations_exercise2/transformations_exercise2.cpp index e9c6d33..929c708 100644 --- a/src/1.getting_started/5.2.transformations_exercise2/transformations_exercise2.cpp +++ b/src/1.getting_started/5.2.transformations_exercise2/transformations_exercise2.cpp @@ -26,7 +26,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/6.1.coordinate_systems/coordinate_systems.cpp b/src/1.getting_started/6.1.coordinate_systems/coordinate_systems.cpp index cba3bd7..75feada 100644 --- a/src/1.getting_started/6.1.coordinate_systems/coordinate_systems.cpp +++ b/src/1.getting_started/6.1.coordinate_systems/coordinate_systems.cpp @@ -26,7 +26,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/6.2.coordinate_systems_depth/coordinate_systems_depth.cpp b/src/1.getting_started/6.2.coordinate_systems_depth/coordinate_systems_depth.cpp index 8af6c3f..20672ee 100644 --- a/src/1.getting_started/6.2.coordinate_systems_depth/coordinate_systems_depth.cpp +++ b/src/1.getting_started/6.2.coordinate_systems_depth/coordinate_systems_depth.cpp @@ -26,7 +26,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/6.3.coordinate_systems_multiple/coordinate_systems_multiple.cpp b/src/1.getting_started/6.3.coordinate_systems_multiple/coordinate_systems_multiple.cpp index db2acaa..ea5ed54 100644 --- a/src/1.getting_started/6.3.coordinate_systems_multiple/coordinate_systems_multiple.cpp +++ b/src/1.getting_started/6.3.coordinate_systems_multiple/coordinate_systems_multiple.cpp @@ -26,7 +26,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/7.1.camera_circle/camera_circle.cpp b/src/1.getting_started/7.1.camera_circle/camera_circle.cpp index 60074b6..37de2c3 100644 --- a/src/1.getting_started/7.1.camera_circle/camera_circle.cpp +++ b/src/1.getting_started/7.1.camera_circle/camera_circle.cpp @@ -26,7 +26,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/7.2.camera_keyboard_dt/camera_keyboard_dt.cpp b/src/1.getting_started/7.2.camera_keyboard_dt/camera_keyboard_dt.cpp index f8e322a..af643bd 100644 --- a/src/1.getting_started/7.2.camera_keyboard_dt/camera_keyboard_dt.cpp +++ b/src/1.getting_started/7.2.camera_keyboard_dt/camera_keyboard_dt.cpp @@ -35,7 +35,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/7.3.camera_mouse_zoom/camera_mouse_zoom.cpp b/src/1.getting_started/7.3.camera_mouse_zoom/camera_mouse_zoom.cpp index c60c8e0..72e450c 100644 --- a/src/1.getting_started/7.3.camera_mouse_zoom/camera_mouse_zoom.cpp +++ b/src/1.getting_started/7.3.camera_mouse_zoom/camera_mouse_zoom.cpp @@ -44,7 +44,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/1.getting_started/7.4.camera_class/camera_class.cpp b/src/1.getting_started/7.4.camera_class/camera_class.cpp index ba336de..cc9c167 100644 --- a/src/1.getting_started/7.4.camera_class/camera_class.cpp +++ b/src/1.getting_started/7.4.camera_class/camera_class.cpp @@ -39,7 +39,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/1.colors/colors.cpp b/src/2.lighting/1.colors/colors.cpp index 265f42b..35816af 100644 --- a/src/2.lighting/1.colors/colors.cpp +++ b/src/2.lighting/1.colors/colors.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp b/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp index 0b35e7c..cfeb5eb 100644 --- a/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp +++ b/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp b/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp index e9fb46a..35fe2b9 100644 --- a/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp +++ b/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/3.1.materials/materials.cpp b/src/2.lighting/3.1.materials/materials.cpp index 28719e1..d834ecc 100644 --- a/src/2.lighting/3.1.materials/materials.cpp +++ b/src/2.lighting/3.1.materials/materials.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp b/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp index 1bf46f5..36760b0 100644 --- a/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp +++ b/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp b/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp index 2b6c076..7211957 100644 --- a/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp +++ b/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp b/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp index 96f1d5a..e12d143 100644 --- a/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp +++ b/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/2.lighting/4.3.lighting_maps_exercise4/lighting_maps_exercise4.cpp b/src/2.lighting/4.3.lighting_maps_exercise4/lighting_maps_exercise4.cpp index b55ee8c..5e85b57 100644 --- a/src/2.lighting/4.3.lighting_maps_exercise4/lighting_maps_exercise4.cpp +++ b/src/2.lighting/4.3.lighting_maps_exercise4/lighting_maps_exercise4.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/3.model_loading/1.model_loading/model_loading.cpp b/src/3.model_loading/1.model_loading/model_loading.cpp index 4d7385f..974ffd7 100644 --- a/src/3.model_loading/1.model_loading/model_loading.cpp +++ b/src/3.model_loading/1.model_loading/model_loading.cpp @@ -39,7 +39,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/1.1.depth_testing/depth_testing.cpp b/src/4.advanced_opengl/1.1.depth_testing/depth_testing.cpp index 70040c3..32fd6fa 100644 --- a/src/4.advanced_opengl/1.1.depth_testing/depth_testing.cpp +++ b/src/4.advanced_opengl/1.1.depth_testing/depth_testing.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/1.2.depth_testing_view/depth_testing_view.cpp b/src/4.advanced_opengl/1.2.depth_testing_view/depth_testing_view.cpp index f70d185..0bfc711 100644 --- a/src/4.advanced_opengl/1.2.depth_testing_view/depth_testing_view.cpp +++ b/src/4.advanced_opengl/1.2.depth_testing_view/depth_testing_view.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/10.1.instancing_quads/instancing_quads.cpp b/src/4.advanced_opengl/10.1.instancing_quads/instancing_quads.cpp index 0609ce3..5b2f349 100644 --- a/src/4.advanced_opengl/10.1.instancing_quads/instancing_quads.cpp +++ b/src/4.advanced_opengl/10.1.instancing_quads/instancing_quads.cpp @@ -20,7 +20,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/10.2.asteroids/asteroids.cpp b/src/4.advanced_opengl/10.2.asteroids/asteroids.cpp index 8ab3f85..0c21ee4 100644 --- a/src/4.advanced_opengl/10.2.asteroids/asteroids.cpp +++ b/src/4.advanced_opengl/10.2.asteroids/asteroids.cpp @@ -40,7 +40,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/10.3.asteroids_instanced/asteroids_instanced.cpp b/src/4.advanced_opengl/10.3.asteroids_instanced/asteroids_instanced.cpp index b02393c..60c3061 100644 --- a/src/4.advanced_opengl/10.3.asteroids_instanced/asteroids_instanced.cpp +++ b/src/4.advanced_opengl/10.3.asteroids_instanced/asteroids_instanced.cpp @@ -40,7 +40,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/11.anti_aliasing_offscreen/anti_aliasing_offscreen.cpp b/src/4.advanced_opengl/11.anti_aliasing_offscreen/anti_aliasing_offscreen.cpp index f59c56f..ce62568 100644 --- a/src/4.advanced_opengl/11.anti_aliasing_offscreen/anti_aliasing_offscreen.cpp +++ b/src/4.advanced_opengl/11.anti_aliasing_offscreen/anti_aliasing_offscreen.cpp @@ -40,7 +40,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/2.stencil_testing/stencil_testing.cpp b/src/4.advanced_opengl/2.stencil_testing/stencil_testing.cpp index 4a7a85f..8c43b3f 100644 --- a/src/4.advanced_opengl/2.stencil_testing/stencil_testing.cpp +++ b/src/4.advanced_opengl/2.stencil_testing/stencil_testing.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/3.1.blending_discard/blending_discard.cpp b/src/4.advanced_opengl/3.1.blending_discard/blending_discard.cpp index 2e6e6fe..aed79a0 100644 --- a/src/4.advanced_opengl/3.1.blending_discard/blending_discard.cpp +++ b/src/4.advanced_opengl/3.1.blending_discard/blending_discard.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/3.2.blending_sort/blending_sorted.cpp b/src/4.advanced_opengl/3.2.blending_sort/blending_sorted.cpp index a74f65c..551f84c 100644 --- a/src/4.advanced_opengl/3.2.blending_sort/blending_sorted.cpp +++ b/src/4.advanced_opengl/3.2.blending_sort/blending_sorted.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/5.1.framebuffers/framebuffers.cpp b/src/4.advanced_opengl/5.1.framebuffers/framebuffers.cpp index 84d9db0..fedd96d 100644 --- a/src/4.advanced_opengl/5.1.framebuffers/framebuffers.cpp +++ b/src/4.advanced_opengl/5.1.framebuffers/framebuffers.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp b/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp index bdeaa31..be5a8e0 100644 --- a/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp +++ b/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp @@ -41,7 +41,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/6.1.cubemaps_skybox/cubemaps_skybox.cpp b/src/4.advanced_opengl/6.1.cubemaps_skybox/cubemaps_skybox.cpp index e60d70c..61011ac 100644 --- a/src/4.advanced_opengl/6.1.cubemaps_skybox/cubemaps_skybox.cpp +++ b/src/4.advanced_opengl/6.1.cubemaps_skybox/cubemaps_skybox.cpp @@ -42,7 +42,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/6.2.cubemaps_environment_mapping/cubemaps_environment_mapping.cpp b/src/4.advanced_opengl/6.2.cubemaps_environment_mapping/cubemaps_environment_mapping.cpp index e53a191..036ad88 100644 --- a/src/4.advanced_opengl/6.2.cubemaps_environment_mapping/cubemaps_environment_mapping.cpp +++ b/src/4.advanced_opengl/6.2.cubemaps_environment_mapping/cubemaps_environment_mapping.cpp @@ -42,7 +42,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/8.advanced_glsl_ubo/advanced_glsl_ubo.cpp b/src/4.advanced_opengl/8.advanced_glsl_ubo/advanced_glsl_ubo.cpp index 5df9b7d..c45a51d 100644 --- a/src/4.advanced_opengl/8.advanced_glsl_ubo/advanced_glsl_ubo.cpp +++ b/src/4.advanced_opengl/8.advanced_glsl_ubo/advanced_glsl_ubo.cpp @@ -39,7 +39,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/9.1.geometry_shader_houses/geometry_shader_houses.cpp b/src/4.advanced_opengl/9.1.geometry_shader_houses/geometry_shader_houses.cpp index d80dbc9..48e8895 100644 --- a/src/4.advanced_opengl/9.1.geometry_shader_houses/geometry_shader_houses.cpp +++ b/src/4.advanced_opengl/9.1.geometry_shader_houses/geometry_shader_houses.cpp @@ -20,7 +20,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/9.2.geometry_shader_exploding/geometry_shader_exploding.cpp b/src/4.advanced_opengl/9.2.geometry_shader_exploding/geometry_shader_exploding.cpp index 28e3fa0..7e6eec6 100644 --- a/src/4.advanced_opengl/9.2.geometry_shader_exploding/geometry_shader_exploding.cpp +++ b/src/4.advanced_opengl/9.2.geometry_shader_exploding/geometry_shader_exploding.cpp @@ -40,7 +40,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/4.advanced_opengl/9.3.geometry_shader_normals/normal_visualization.cpp b/src/4.advanced_opengl/9.3.geometry_shader_normals/normal_visualization.cpp index 4436a34..05cddba 100644 --- a/src/4.advanced_opengl/9.3.geometry_shader_normals/normal_visualization.cpp +++ b/src/4.advanced_opengl/9.3.geometry_shader_normals/normal_visualization.cpp @@ -40,7 +40,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/1.advanced_lighting/advanced_lighting.cpp b/src/5.advanced_lighting/1.advanced_lighting/advanced_lighting.cpp index a515d97..d4bec55 100644 --- a/src/5.advanced_lighting/1.advanced_lighting/advanced_lighting.cpp +++ b/src/5.advanced_lighting/1.advanced_lighting/advanced_lighting.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/2.gamma_correction/gamma_correction.cpp b/src/5.advanced_lighting/2.gamma_correction/gamma_correction.cpp index d1078a6..0973140 100644 --- a/src/5.advanced_lighting/2.gamma_correction/gamma_correction.cpp +++ b/src/5.advanced_lighting/2.gamma_correction/gamma_correction.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/3.1.1.shadow_mapping_depth/shadow_mapping_depth.cpp b/src/5.advanced_lighting/3.1.1.shadow_mapping_depth/shadow_mapping_depth.cpp index 933963c..0ee8c5d 100644 --- a/src/5.advanced_lighting/3.1.1.shadow_mapping_depth/shadow_mapping_depth.cpp +++ b/src/5.advanced_lighting/3.1.1.shadow_mapping_depth/shadow_mapping_depth.cpp @@ -47,7 +47,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/3.1.2.shadow_mapping_base/shadow_mapping_base.cpp b/src/5.advanced_lighting/3.1.2.shadow_mapping_base/shadow_mapping_base.cpp index 78503bb..9592136 100644 --- a/src/5.advanced_lighting/3.1.2.shadow_mapping_base/shadow_mapping_base.cpp +++ b/src/5.advanced_lighting/3.1.2.shadow_mapping_base/shadow_mapping_base.cpp @@ -47,7 +47,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/3.1.3.shadow_mapping/shadow_mapping.cpp b/src/5.advanced_lighting/3.1.3.shadow_mapping/shadow_mapping.cpp index 0834179..47fccd2 100644 --- a/src/5.advanced_lighting/3.1.3.shadow_mapping/shadow_mapping.cpp +++ b/src/5.advanced_lighting/3.1.3.shadow_mapping/shadow_mapping.cpp @@ -47,7 +47,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/3.2.1.point_shadows/point_shadows.cpp b/src/5.advanced_lighting/3.2.1.point_shadows/point_shadows.cpp index ae21cc4..8f1930a 100644 --- a/src/5.advanced_lighting/3.2.1.point_shadows/point_shadows.cpp +++ b/src/5.advanced_lighting/3.2.1.point_shadows/point_shadows.cpp @@ -45,7 +45,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/3.2.2.point_shadows_soft/point_shadows_soft.cpp b/src/5.advanced_lighting/3.2.2.point_shadows_soft/point_shadows_soft.cpp index 573f21a..33900dc 100644 --- a/src/5.advanced_lighting/3.2.2.point_shadows_soft/point_shadows_soft.cpp +++ b/src/5.advanced_lighting/3.2.2.point_shadows_soft/point_shadows_soft.cpp @@ -45,7 +45,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/3.3.csm/csm.cpp b/src/5.advanced_lighting/3.3.csm/csm.cpp index b755719..13bbe5c 100644 --- a/src/5.advanced_lighting/3.3.csm/csm.cpp +++ b/src/5.advanced_lighting/3.3.csm/csm.cpp @@ -48,7 +48,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif GLFWwindow* window = glfwCreateWindow(screenWidth, screenHeight, "LearnOpenGL", nullptr, nullptr); // Windowed glfwMakeContextCurrent(window); diff --git a/src/5.advanced_lighting/4.normal_mapping/normal_mapping.cpp b/src/5.advanced_lighting/4.normal_mapping/normal_mapping.cpp index f044b8a..3a84c2f 100644 --- a/src/5.advanced_lighting/4.normal_mapping/normal_mapping.cpp +++ b/src/5.advanced_lighting/4.normal_mapping/normal_mapping.cpp @@ -42,7 +42,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/5.1.parallax_mapping/parallax_mapping.cpp b/src/5.advanced_lighting/5.1.parallax_mapping/parallax_mapping.cpp index fe2faaa..226e970 100644 --- a/src/5.advanced_lighting/5.1.parallax_mapping/parallax_mapping.cpp +++ b/src/5.advanced_lighting/5.1.parallax_mapping/parallax_mapping.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/5.2.steep_parallax_mapping/steep_parallax_mapping.cpp b/src/5.advanced_lighting/5.2.steep_parallax_mapping/steep_parallax_mapping.cpp index e43525c..cc8b6f5 100644 --- a/src/5.advanced_lighting/5.2.steep_parallax_mapping/steep_parallax_mapping.cpp +++ b/src/5.advanced_lighting/5.2.steep_parallax_mapping/steep_parallax_mapping.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/5.3.parallax_occlusion_mapping/parallax_occlusion_mapping.cpp b/src/5.advanced_lighting/5.3.parallax_occlusion_mapping/parallax_occlusion_mapping.cpp index 194a3e8..c786ac6 100644 --- a/src/5.advanced_lighting/5.3.parallax_occlusion_mapping/parallax_occlusion_mapping.cpp +++ b/src/5.advanced_lighting/5.3.parallax_occlusion_mapping/parallax_occlusion_mapping.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/6.hdr/hdr.cpp b/src/5.advanced_lighting/6.hdr/hdr.cpp index e8ce164..713ad2f 100644 --- a/src/5.advanced_lighting/6.hdr/hdr.cpp +++ b/src/5.advanced_lighting/6.hdr/hdr.cpp @@ -46,7 +46,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/7.bloom/bloom.cpp b/src/5.advanced_lighting/7.bloom/bloom.cpp index 9be9440..1ef70cf 100644 --- a/src/5.advanced_lighting/7.bloom/bloom.cpp +++ b/src/5.advanced_lighting/7.bloom/bloom.cpp @@ -46,7 +46,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/8.1.deferred_shading/deferred_shading.cpp b/src/5.advanced_lighting/8.1.deferred_shading/deferred_shading.cpp index de8b8d0..2a12bff 100644 --- a/src/5.advanced_lighting/8.1.deferred_shading/deferred_shading.cpp +++ b/src/5.advanced_lighting/8.1.deferred_shading/deferred_shading.cpp @@ -42,7 +42,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/8.2.deferred_shading_volumes/deferred_shading_volumes.cpp b/src/5.advanced_lighting/8.2.deferred_shading_volumes/deferred_shading_volumes.cpp index 75c0c4e..c67ec64 100644 --- a/src/5.advanced_lighting/8.2.deferred_shading_volumes/deferred_shading_volumes.cpp +++ b/src/5.advanced_lighting/8.2.deferred_shading_volumes/deferred_shading_volumes.cpp @@ -42,7 +42,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/5.advanced_lighting/9.ssao/ssao.cpp b/src/5.advanced_lighting/9.ssao/ssao.cpp index 716735e..b16a028 100644 --- a/src/5.advanced_lighting/9.ssao/ssao.cpp +++ b/src/5.advanced_lighting/9.ssao/ssao.cpp @@ -48,7 +48,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/6.pbr/1.1.lighting/lighting.cpp b/src/6.pbr/1.1.lighting/lighting.cpp index c209d36..2e08151 100644 --- a/src/6.pbr/1.1.lighting/lighting.cpp +++ b/src/6.pbr/1.1.lighting/lighting.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/6.pbr/1.2.lighting_textured/lighting_textured.cpp b/src/6.pbr/1.2.lighting_textured/lighting_textured.cpp index 91f2596..3bfb631 100644 --- a/src/6.pbr/1.2.lighting_textured/lighting_textured.cpp +++ b/src/6.pbr/1.2.lighting_textured/lighting_textured.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/6.pbr/2.1.1.ibl_irradiance_conversion/ibl_irradiance_conversion.cpp b/src/6.pbr/2.1.1.ibl_irradiance_conversion/ibl_irradiance_conversion.cpp index c761f51..a906d93 100644 --- a/src/6.pbr/2.1.1.ibl_irradiance_conversion/ibl_irradiance_conversion.cpp +++ b/src/6.pbr/2.1.1.ibl_irradiance_conversion/ibl_irradiance_conversion.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/6.pbr/2.1.2.ibl_irradiance/ibl_irradiance.cpp b/src/6.pbr/2.1.2.ibl_irradiance/ibl_irradiance.cpp index 5dd231f..cbbbf25 100644 --- a/src/6.pbr/2.1.2.ibl_irradiance/ibl_irradiance.cpp +++ b/src/6.pbr/2.1.2.ibl_irradiance/ibl_irradiance.cpp @@ -43,7 +43,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/6.pbr/2.2.1.ibl_specular/ibl_specular.cpp b/src/6.pbr/2.2.1.ibl_specular/ibl_specular.cpp index 81cd8d6..e00819b 100644 --- a/src/6.pbr/2.2.1.ibl_specular/ibl_specular.cpp +++ b/src/6.pbr/2.2.1.ibl_specular/ibl_specular.cpp @@ -44,7 +44,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/6.pbr/2.2.2.ibl_specular_textured/ibl_specular_textured.cpp b/src/6.pbr/2.2.2.ibl_specular_textured/ibl_specular_textured.cpp index c4e5133..5278503 100644 --- a/src/6.pbr/2.2.2.ibl_specular_textured/ibl_specular_textured.cpp +++ b/src/6.pbr/2.2.2.ibl_specular_textured/ibl_specular_textured.cpp @@ -45,7 +45,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // -------------------- diff --git a/src/7.in_practice/1.debugging/debugging.cpp b/src/7.in_practice/1.debugging/debugging.cpp index 232f3cc..542e9f6 100644 --- a/src/7.in_practice/1.debugging/debugging.cpp +++ b/src/7.in_practice/1.debugging/debugging.cpp @@ -96,7 +96,10 @@ int main() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); // comment this line in a release build! - //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X + +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X +#endif // glfw window creation // --------------------