Changeset fccd588 in network-game for graphics_library/main.cpp
- Timestamp:
- Jan 8, 2019, 9:43:52 PM (6 years ago)
- Branches:
- master
- Children:
- ea3a3a9
- Parents:
- 8cbeffc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
graphics_library/main.cpp
r8cbeffc rfccd588 19 19 #include "common/controls.hpp" 20 20 21 int main( void ) 22 { 21 int main( void ) { 23 22 // Initialise GLFW 24 if( !glfwInit() ) 25 { 23 if( !glfwInit() ) { 26 24 fprintf( stderr, "Failed to initialize GLFW\n" ); 27 25 return -1; 28 26 } 29 27 30 glfwWindowHint(GLFW_SAMPLES, 4); 31 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 32 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); 33 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 28 #ifdef __APPLE__ 29 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 30 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); 31 glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); 32 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 33 #else 34 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); 35 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); 36 #endif 34 37 35 38 // Open a window and create its OpenGL context
Note:
See TracChangeset
for help on using the changeset viewer.