title: How to determine the maximum number of supported multisample samples
body: <p>I'm using SDL 2 for an OpenGL based application and I'm currently implementing anti-aliasing with code like this:</p>
  
  <pre><code>SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
  SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, samples);
  </code></pre>
  
  <p>But I don't want to hardcode the antialising level so I want to let the user choose the value from a list of valid values. The problem is I have no idea how to find out which values are supported on the users machine. On my gaming machine I can choose a maximum value of 16 but on my laptop I can only choose 4. Any higher setting triggers the error message <code>Couldn't find matching GLX visual</code>.</p>
  
  <p>So how can I find out what maximum value I can use for the <code>SDL_GL_MULTISAMPLESAMPLES</code> attribute?</p>