title: How to read direct3d texture pixels
body: <p>So I have a x8r8g8b8 formatted IDirect3DSurface9 that contains the contents of the back buffer.  When I call LockRect on it I get access to a struct containing pBits, a pointer to the pixels I assume, and and integer Pitch (which I am very unclear about its purpose).  </p>
  
  <p>How to read the individual pixels?</p>
  
  <p>Visual Studio 2008 C++</p>