How-To: Count the Total Number of Triangles in HPS

Language: C++

In HPS, there is the UpdateInfo struct which has various data members, among them is triangle information.

Below is a code snippet for the HPS MFC Sandbox project:

HPS::UpdateInfo update_info;
_canvas.GetWindowKey().GetWindowInfoControl().ShowLastUpdateInfo(update_info);
int triangles = update_info.triangle_3d_count + update_info.display_list_triangle_3d_count;