title: SDL2 Invalid Renderer
body: <p>I believe I have an SDL2 bug here and I wanted some verification. When I create a renderer it is invalid and I cannot initialize SDL_ttf because of this. Here is a quick demo program that exhibits the issue on my xubuntu 14.04 distribution. My graphics card is an NVIDIA GTX 550 Ti. Driver version 331.113 proprietary, tested. </p>
  
  <pre><code>#include &lt;SDL2/SDL.h&gt;
  
  #include &lt;string&gt;
  #include &lt;stdexcept&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
  SDL_Window* _window;
  SDL_Renderer* _renderer;
  
  if( SDL_Init( SDL_INIT_EVERYTHING ) != 0 ) {
      string error( SDL_GetError() );
      throw runtime_error( "SDL could not initialize! SDL Error: " + error );
  }
  
  _window = SDL_CreateWindow( "Conscious", SDL_WINDOWPOS_UNDEFINED,
          SDL_WINDOWPOS_UNDEFINED, 500, 500, SDL_WINDOW_SHOWN );
  if( _window == NULL ) {
      string error( SDL_GetError() );
      throw runtime_error( "Window could not be created! SDL Error: " + error );
  }
  
  _renderer = SDL_CreateRenderer( _window , -1,
          SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC );
  if( _renderer == NULL ) {
      string error( SDL_GetError() );
      throw runtime_error( "Renderer could not be created! SDL Error: " + error );
  }
  
  cout &lt;&lt; SDL_GetError() &lt;&lt; endl;
  
  return 0;
  }
  </code></pre>
  
  <p>Let me know what you think!</p>
  
  <p>Thanks,
  Jonathon</p>
  
  <p>--EDIT--</p>
  
  <p>If you take out SDL_image and SDL_ttf the renderer is still returned as invalid. 
  Also this does not happen on windows with the same exact hardware. If this is not a bug would somebody please explain what could be wrong with such a simple example?</p>
  
  <p>--EDIT EDIT--
  This code prints out "Invalid renderer" on my system. If you have SDL2 please run it and let me know if you do too.</p>