title: SDL2 OpengGL Anti-aliasing has no effect
body: <p>I want to draw smooth fill elipse with SDL2.
  I have following code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;SDL2/SDL.h&gt;
  #include &lt;SDL2/SDL2_gfxPrimitives.h&gt;
  #include &lt;GL/gl.h&gt;
  
  void init()
  {
     SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
     SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2);
     glEnable(GL_MULTISAMPLE);
  }
  
  int main()
  {
     SDL_Init(SDL_INIT_EVERYTHING);
     init();
  
  SDL_Window* window = SDL_CreateWindow("Anti-aliasing test",
                                        SDL_WINDOWPOS_CENTERED,
                                        SDL_WINDOWPOS_CENTERED,
                                        100, 100,
                                        SDL_WINDOW_RESIZABLE);
  SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
  
  int Buffers, Samples;
  SDL_GL_GetAttribute( SDL_GL_MULTISAMPLEBUFFERS, &amp;Buffers );
  SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES, &amp;Samples );
  std::cout &lt;&lt; "buf = " &lt;&lt; Buffers &lt;&lt; ", samples = " &lt;&lt; Samples;
  std::cout.flush();
  
  
  SDL_Event e;
  int x, y;
  while(true)
  {
      SDL_WaitEvent(&amp;e);
      if (e.type == SDL_QUIT)
          break;
  
      SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
      SDL_RenderClear(renderer);
      SDL_GetWindowSize(window, &amp;x, &amp;y);
      filledEllipseRGBA(renderer, x / 2, y / 2, 50, 50,  255, 0, 0, 255);
      SDL_RenderPresent(renderer);
  }
  }
  </code></pre>
  
  <p>I expected to draw with anti-aliasing, but actually I have no effect from OpenGL.</p>
  
  <p>We can see that my circle don't use alpha channel, which is necessary for AA. But console output is "buffer = 0, samples = 4".</p>
  
  <p>Any idea about how can I activate(of fix) AA in SDL2 (with or without OpenGL). </p>
  
  <p>Next screenshot demonstrate what I have and what I want. Bottom picture drawed in Pinta software.</p>
  
  <p><img src="https://i.stack.imgur.com/tL8yJ.png" alt="enter image description here"></p>