Implementing a new Direct3D function