Added Direct3D routines