Corrected function call ordering in Direct3D