Added part of D3D initialization.