title: SDL2 Can't create window since it couldn't find matching GLX visual
body: <p>I have a problem as i am currently running Ubuntu Terminal on Windows 10. I also have XMing installed as my X-server(I use XMing for qemu,etc...). And i am trying to run this SDL2 Program. So i have this for main.cpp:</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  #include &lt;stdlib.h&gt; 
  #include &lt;unistd.h&gt; 
  
  #include &lt;SDL2/SDL.h&gt; 
  #include &lt;GL/gl.h&gt; 
  
  int main(int argc, char *argv[]) 
  { 
          int final_status = 1; 
          SDL_Window *window; 
          SDL_GLContext openGL_context; 
  
          if (SDL_Init(SDL_INIT_VIDEO)) { 
                  fprintf(stderr, "Unable to initialize SDL: %s\n", 
                          SDL_GetError()); 
                  return 1; 
          } 
          window = SDL_CreateWindow("My Demo", SDL_WINDOWPOS_CENTERED, 
                                    SDL_WINDOWPOS_CENTERED, 640, 480, 
                                    SDL_WINDOW_OPENGL); 
          if (!window) { 
                  fprintf(stderr, "Can't create window: %s\n", SDL_GetError()); 
                  goto finished; 
          } 
  
          openGL_context = SDL_GL_CreateContext(window); 
          if (!openGL_context) { 
                  fprintf(stderr, "Can't create openGL context: %s\n", 
                          SDL_GetError()); 
                  goto close_window; 
          } 
  
          /* drawing code removed */ 
  
          final_status = 0; 
          SDL_GL_DeleteContext(openGL_context); 
  close_window: 
          SDL_DestroyWindow(window); 
  finished: 
          SDL_Quit(); 
          fprintf(stdout, "done\n"); 
          fflush(stdout); 
          return final_status; 
  }  
  </code></pre>
  
  <p>And then when i run <code>g++ main.cpp -lSDL2</code> , i get this output:</p>
  
  <pre><code>Can't create window: Couldn't find matching GLX visual
  done
  </code></pre>
  
  <p>I have tried to search how to solve this GLX Problem but can't seem to find a solution for it. Help would be greatly appreciated!</p>