title: SDL_CreateRenderer creates Invalid renderer
body: <p>I'm trying to create a render in SDL2 by doing:</p>
  
  <pre><code>SDL_Init(SDL_INIT_VIDEO);
  SDL_Window * w = SDL_CreateWindow("Window", 0, 0, 500, 500 0);
  SDL_Renderer * r = SDL_CreateRenderer(w, -1, 0);
  </code></pre>
  
  <p>but after SDL_CreateRenderer I print SDL_GetError() and it shows:</p>
  
  <blockquote>
    <p>Invalid renderer</p>
  </blockquote>
  
  <p>When rendering some things are rendered badly (this is part of a game). In this same computer on windows it works well and it does not show the "Invalid renderer" error.</p>
  
  <p>I first downloaded SDL2 with apt-get install, but I later compiled it from source and I'm still having the same problem.</p>
  
  <p>I'm not sure if it is important but I'm running Ubuntu 14.04 with gnome shell. I've got an ati video card and I'm using xserver-xorg driver. I was using fglrx but it had another problem with SDL so I changed it.</p>
  
  <p>Any clues on what could be happening or how can this be fixed?</p>