DirectX indeed provides an easy way of doing this. But it's completely different with OpenGL, the context creation totally depends on the API provided by the OS (WGL, GLX, AGL, EGL), and those generally provide no way of retrieving the supported antialiasing levels. Testing a given value would be possible though, but it needs a valid context to be created first (at least on Windows).