i’m writing a program that displays an object as a collection of points…
how do i implement hidden surface removal???

maybe it will work if you first draw the object “invisible”, with solid faces that are in the same colour as the background, and after that in a second pass the points, with GL_EQUAL as depth function.

or you draw a face and directly after the face, the points.

or you draw solid faces with a texture that is entirely black (or whatever colour the background has) with white spots in the corners, which you map to the vertices (via texture coordinates).

and surely there are lot more ways to do this, i guess.