Index: graphics_library/TextureFragmentShader.fragmentshader
===================================================================
--- graphics_library/TextureFragmentShader.fragmentshader	(revision 8cbeffc2904dfe45d48e2f53af8a05c5aee9b88b)
+++ graphics_library/TextureFragmentShader.fragmentshader	(revision fccd588a9281bc5a6608ac1e1819144f66316609)
@@ -13,4 +13,4 @@
 
 	// Output color = color of the texture at the specified UV
-	color = texture2D( myTextureSampler, UV ).rgb;
+	color = texture( myTextureSampler, UV ).rgb;
 }
Index: graphics_library/main.cpp
===================================================================
--- graphics_library/main.cpp	(revision 8cbeffc2904dfe45d48e2f53af8a05c5aee9b88b)
+++ graphics_library/main.cpp	(revision fccd588a9281bc5a6608ac1e1819144f66316609)
@@ -19,17 +19,20 @@
 #include "common/controls.hpp"
 
-int main( void )
-{
+int main( void ) {
         // Initialise GLFW
-        if( !glfwInit() )
-        {
+        if( !glfwInit() ) {
                 fprintf( stderr, "Failed to initialize GLFW\n" );
                 return -1;
         }
 
-        glfwWindowHint(GLFW_SAMPLES, 4);
-        glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
-        glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
-        glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
+        #ifdef __APPLE__
+            glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
+            glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
+            glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
+            glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
+        #else
+            glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
+            glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
+        #endif
 
         // Open a window and create its OpenGL context
Index: graphics_library/makefile
===================================================================
--- graphics_library/makefile	(revision 8cbeffc2904dfe45d48e2f53af8a05c5aee9b88b)
+++ graphics_library/makefile	(revision fccd588a9281bc5a6608ac1e1819144f66316609)
@@ -1,6 +1,13 @@
+OS = $(shell uname)
 CC = g++
-LIB_FLAGS = -lGL -lglut -lGLEW `pkg-config glfw3 --static --cflags --libs`
 FLAGS = -Wall
 DEPENDENCIES = common/texture.o common/controls.o common/shader.o
+
+ifeq ($(OS),Darwin)
+	LIB_FLAGS = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw3 -lglew
+endif
+ifeq ($(OS),Linux)
+	LIB_FLAGS = -lGL -lglut -lGLEW `pkg-config glfw3 --static --cflags --libs`
+endif
 
 graphics_engine : main.cpp $(DEPENDENCIES)
