wined3d: Move setting the draw buffer to a separate function.