filter-set can be used to determine what version of OpenGL and which extensions are used by a particular application. It can be used to check that an application does not accidentally depend on an OpenGL version that is not targetted. The most common error is calling a core OpenGL function (for a recent version of OpenGL) when one intended to use an older and more widely supported extension.
Note that it can only report what is used, not what is required, which may be different if the application uses certain features only after detecting them (but see
for a way to handle this). It also only tests the run-time usage; the compile-time usage may be different.
Two methods are used for detection: the functions called and the enumerants passed to functions. The former is quite reliable, since different entry points are used for the core and extension versions of the same function. The latter is necessary to detect extensions such as
which do not introduce new function calls, but it is less reliable as many enumerants share values. Some extensions are not detected at all:
does not introduce any tokens or functions, and some promoted extensions (such as
GL_ARB_pixel_buffer_object) have additional semantics to their predecessors but again introduce no new tokens or functions.
A typical output is the following:
Min GL version: GL_VERSION_1_5
Min GLX version: GLX_VERSION_1_2
Used extensions: GL_ARB_shader_objects GL_ARB_vertex_shader
This indicates that the application used OpenGL 1.5 and GLX 1.2 (and possibly some extensions that are incorporated into OpenGL 1.5), as well as the extensions listed.