Added all the DirectX magic.