MAC OpenGL shader error: “version '150' is not supported ”

后端 未结 3 607
长发绾君心
长发绾君心 2021-01-28 12:45

I follow the book \"OpenGL SuperBible 5th Edition\" to study openGL, the capture 6th demo to create shader by hand all not work. Like the demo of \"ShadedTriangle\", to create

3条回答
  •  轮回少年
    2021-01-28 13:27

    macOS' system GLUT does not have the capability of creating an OpenGL 3+ context.

    FreeGLUT provides a way to do it, taken from here:

    glutInitContextVersion(3,2); /* or later versions, core was introduced only with 3.2 */
    glutInitContextProfile(GLUT_CORE_PROFILE);
    

    Or you can take @izzy's advice and use GLFW.

提交回复
热议问题