title: How can I do double buffering in SDL 2.0?
body: <p>I have a tile tile map array [50][50].</p>
  
  <p>When I click the mouse to move the x and y of every single tile in that array I see white spaces between each tile - I believe this is called 'tearing', it isn't desired. </p>
  
  <p>I googled double buffering and read the wiki, <a href="http://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics</a> . </p>
  
  <p>How is it done in SDL2, specifically with large tile arrays created from 'for loops'?</p>
  
  <p>...I suspect you copy tile textures onto a buffer texture and copy that to the renderer once its fully loaded - though I couldn't get this to work, would love to see a full working example!</p>
  
  <p>This is my previous post with current my current code:
  <a href="https://stackoverflow.com/questions/28334892/sdl2-double-buffer-not-working-still-tearing">SDL2 double buffer not working, still tearing</a></p>