Working d3d base (source code) - MPGH