Changeset 446e55d in opengl-game for new-game.cpp


Ignore:
Timestamp:
Oct 19, 2018, 4:27:54 PM (6 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
3d96d13
Parents:
8e8aed6
Message:

Fix the OpenGL version issue on OSX by making it only request an OpenGL 3.3 context, since OSX doesn't support OpenGL 4.3 contexts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • new-game.cpp

    r8e8aed6 r446e55d  
    264264   glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
    265265   glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
     266#else
     267   glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
     268   glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    266269#endif
    267270
     
    269272   GLFWmonitor* mon = NULL;
    270273
    271    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
    272    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    273274   glfwWindowHint(GLFW_SAMPLES, 16);
    274275   glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, true);
     
    299300      glDebugMessageCallback((GLDEBUGPROC)debugGlCallback, nullptr);
    300301      cout << "Bound debug callback" << endl;
     302   } else {
     303     cout << "OpenGL debugg message callback is not supported" << endl;
    301304   }
    302305
Note: See TracChangeset for help on using the changeset viewer.