title: Microsoft GDI. BitBlt vs StretchDIBits
body: <p>Hi so I'm trying to write a basic software renderer using the Windows GDI API, but I'm unsure which blitting option to use.</p>
  
  <p><strong>Option 1: Use StretchDIBits directly on a simple Device Independent Bitmap directly</strong></p>
  
  <p><strong>Option 2: Use BitBlt along with SetDIBits</strong></p>
  
  <p>Now, I understand that BitBlt is meant to be used with Device Dependent Bitmaps, in which case it would certainly never be slower than StretcthDIBits, since there isn't a translation phase; however, since I don't really want to have to deal with DDBs and am using SetDIBits anyway, which will according to MSDN</p>
  
  <blockquote>
    <p>set the pixels in a compatible bitmap (DDB) using the color data
    found in the specified DIB.</p>
  </blockquote>
  
  <p>Can I assume that the speed would be comparable, if not in favor of StretchDIBits? </p>
  
  <p>I tried to do research before posting my question, but it is entirely possible that I misunderstood what I read, so I'd really appreciate someone explaining the distinction between these 2 functions in a slightly less archaic way than MSDN.</p>
  
  <p>Thanks!</p>
  
  <p><strong><em>EDIT: I am using a Src and Dest Buffer with the same size btw, so the actual stretch functionality is almost irrelevant; I just need a 1:1 blit.</em></strong></p>