This is an addition to the WGL_ARB_create_context extension and related extensions on other operating systems.
Currently *GetString( Extensions ); returns around 150 separate extension strings, even though many of these have been promoted to core features.
This is required to support older applications that were written for older versions of OpenGL.
Many new applications also check for old extension strings because its simpler than writing separate code paths for each different OpenGL version.
However the WGL_ARB_create_context extension allows the application to explicitly ask for a particular OpenGL version:
This then allows the driver to only return extension names that are relevant to that application.
In the same way that the string returned by *GetString( Version ) changes depending on the returned context, we change the string pointed to by *GetString( Extensions ) depending on the requested version.
Additional paragraph to be added to WGL_ARB_create_context:
Querying the GL_EXTENSION string with glGetString or GetStringi( GL_EXTENSION, index ) will return the extensions supported by the current context which have not been promoted to core features in the OpenGL version that was requested in the wglCreateContextAttribsARB call that created this context.
This also fixes the problem of the driver returning extensions for depreciated features.
If WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB is set for the current context then the driver should return an extensions string that does not include any that are depreciated.