Some directx testing code