By assessing angle configuration, presence of synechiae, and trabecular meshwork pigmentation, gonioscopy aids in distinguishing between the two types of glaucoma.