Fixed heightmap example for OS X.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 6ab1b33..1fc93b0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -26,6 +26,7 @@
# Set fancy names for bundles
add_executable(Boing MACOSX_BUNDLE boing.c)
add_executable(Gears MACOSX_BUNDLE gears.c)
+ add_executable(Heightmap MACOSX_BUNDLE heightmap.c ${GLAD})
add_executable(Particles MACOSX_BUNDLE particles.c ${TINYCTHREAD})
add_executable(Simple MACOSX_BUNDLE simple.c)
add_executable(SplitView MACOSX_BUNDLE splitview.c)
@@ -33,12 +34,13 @@
set_target_properties(Boing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Boing")
set_target_properties(Gears PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Gears")
+ set_target_properties(Heightmap PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Heightmap")
set_target_properties(Particles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Particles")
set_target_properties(Simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simple")
set_target_properties(SplitView PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Split View")
set_target_properties(Wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave")
- set_target_properties(Boing Gears Particles Simple SplitView Wave PROPERTIES
+ set_target_properties(Boing Gears Heightmap Particles Simple SplitView Wave PROPERTIES
FOLDER "GLFW3/Examples")
else()
# Set boring names for executables
@@ -69,7 +71,7 @@
endif()
if (APPLE)
- set(BUNDLE_BINARIES Boing Gears Particles Simple SplitView Wave)
+ set(BUNDLE_BINARIES Boing Gears Heightmap Particles Simple SplitView Wave)
set_target_properties(${BUNDLE_BINARIES} PROPERTIES
MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION}
diff --git a/examples/heightmap.c b/examples/heightmap.c
index c57cbbc..9fb75e5 100644
--- a/examples/heightmap.c
+++ b/examples/heightmap.c
@@ -66,10 +66,10 @@
static const char* fragment_shader_text =
"#version 150\n"
-"out vec4 gl_FragColor;\n"
+"out vec4 color;\n"
"void main()\n"
"{\n"
-" gl_FragColor = vec4(0.2, 1.0, 0.2, 1.0); \n"
+" color = vec4(0.2, 1.0, 0.2, 1.0); \n"
"}\n";
/**********************************************************************
@@ -418,7 +418,7 @@
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
- glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);
+ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
window = glfwCreateWindow(800, 600, "GLFW OpenGL3 Heightmap demo", NULL, NULL);
if (! window )