GLFW opens OpenGL 3.2 context but Freeglut can't - why?

后端 未结 3 1856
一整个雨季
一整个雨季 2021-02-15 13:47

I am working on a Mac, I\'ve got FreeGlut compiled and installed, but I can\'t seem to get the OpenGL 3.2 context with it. However, I can get it without any problem while using

3条回答
  •  忘掉有多难
    2021-02-15 14:17

    Freeglut is an extended implementation of the SGI GLUT Toolkit, and ( with a few exceptions around obsolete hardware ) implements the same functions.

    Unfortunately, this includes a number of features that would break in a strictly CORE/FORWARD COMPATIBLE implementation.

    Typically, if you request a context WITHOUT specifying a version or profile, you will get the best that the combination of driver and GL toolkit can offer, which is normally a compatibility profile, rather than core profile.

    Note that the only thing you lose through using a compatibility profile is the supposed checking for deprecated functions. All new core function should work without issue.

    This problem with freeglut is not restricted to Apple, it also manifests under Linux using some Gallium drivers. It is not clear that there is any short-term intent to rectify this, so if you need to use CORE/FORWARD COMPATIBLE, you should probably switch to GLFW or SDL.

提交回复
热议问题