title: SDL_RenderPresent vs SDL_UpdateWindowSurface
body: <p>I have successfully created and drawn both a bitmap image and drawn a green line using a renderer to my SDL window. The problem is I am unsure of how to do both at once on the same window.</p>
  
  <pre><code>void draw::image(){
      SDL_Surface *bmp = SDL_LoadBMP("C:\\Users\\Joe\\Documents\\Visual Studio 2013\\Projects\\SDL_APP1\\map1.bmp");
      SDL_BlitSurface(bmp, 0, SDL_GetWindowSurface(_window), 0);
  
      SDL_Renderer * renderer = SDL_CreateRenderer(_window, -1, 0);
      // draw green line across screen
      SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
      SDL_RenderDrawLine(renderer, 0, 0, 640, 320);
      SDL_RenderPresent(renderer);
      SDL_UpdateWindowSurface(_window);
      SDL_Delay(20000);
  
      // free resources
      SDL_DestroyRenderer(renderer);
      SDL_DestroyWindow(_window);
  }
  </code></pre>
  
  <p>This version of my code draws the bmp file to the window because SDL_UpdateWindowSurface(); is after SDL_RenderPresent(); however when I flip these it draws a green line to the screen. How would I draw the green line over my BMP?</p>