Changeset 5540132 in opengl-game for game.cpp


Ignore:
Timestamp:
Feb 23, 2017, 12:10:22 AM (8 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
15c7ed9
Parents:
5a643d3
Message:

Start detecting the OS in the preprocessor to support running OS-specific code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game.cpp

    r5a643d3 r5540132  
    77// GLFW
    88#include <GLFW/glfw3.h>
     9
     10#ifdef __APPLE__
     11   #define OSX
     12#endif
    913
    1014using namespace std;
     
    2630   glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    2731   glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
     32
     33   // required in OSX
     34   #ifdef OSX
     35      glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
     36   #endif
    2837
    2938   // Create a GLFWwindow object that we can use for GLFW's functions
Note: See TracChangeset for help on using the changeset viewer.