LWJGL - Getting projected (2D) vertices

I am asking this for my friend who is too scared to ask.

How can I get the 2D coordinates of every triangle/polygon drawn onto the screen in LWJGL?

I believe it would be:
projection matrix * view matrix * world matrix * vertex position

would result in a 4 dimensional vector. Use x and y.

Though, projecting vertices on the CPU is kind of expensive.

So you’re saying you have to reproject each triangle/polygon?

Another possible way is OpenGL’s Transform Feedback, by letting the GPU transform the vertices for you and then feeding the transformed positions back to you in a buffer object.
But honestly, I don’t know whether it will actually be faster than just transforming on the CPU, since reading back all the data in a buffer object is really expensive (there could be a break-even point in the tens of thousands of vertices, where memory operations become comparatively faster than the matrix-vector multiplications on the CPU).