added d3d initialize