title: Why do I get bad performance with SDL2 and SDL_RenderCopy inside a double for loop over all pixels?
body: <p>I am programming a raycasting game using SDL2.
  When drawing the floor, I need to call SDL_RenderCopy pixelwise. This leads to a bottleneck which drops the framerate below 10 fps.
  I am looking for performance boosts but can't seem to find some.</p>
  
  <p>Here's a rough overview of the performance drop:</p>
  
  <pre><code>int main() {
    while(true) {
          for(x=0; x&lt;800; x++) {
              for(y=0; y&lt;600; y++) {
                  SDL_Rect src = { 0, 0, 1, 1 };
                  SDL_Rect dst = { x, y, 1, 1 };
                  SDL_RenderCopy(ren, tx, &amp;src, &amp;dst); // this drops the framerate below 10
              }
          }
          SDL_RenderPresent(ren);
      }
   }
  </code></pre>