Just want to point out that the XNA SpriteBatch code has been ported to DirectX and released as OSS by a previous member of the XNA team. So if you want to see exactly how it works in XNA, the latest version of the XNA SpriteBatch as native C++ can be found XNA here you go.on this GitHub repo: .h
& .cpp
A DirectX12 version is also available: .h
& .cpp