openglpropertiesdeprecateddisplaylist

OpenGL display lists (deprecated but supported) how to tell if supported?


I've read that in OpenGL v3 display lists are deprecated, though some manufacturers will support them for the forseeable future.

Is there an OpenGL get... function which tells me explicitly if display lists are supported in the driver I'm interrogating?


Solution

  • Call glGetString with GL_VERSION. If the version is equal or lower than 2.1, display lists are surely supported. In the case the version is greater, it depends if you have requested an OpenGL CORE profile or an OpenGL COMPATIBILITY profile.

    To simplify, if you create a context with wglCreateContext (or equalivalent on other platforms), you are creating a compatibility profile. You should also check support for GL_ARB_compatibility calling glGetString with GL_EXTENSIONS.