How to get vertexes from OpenGL

Hello. I have two intersecting meshes (for examle cube and cylinder) consisting of triangles and I have list of triangle’s vertexes.
After executing subtraction procedure (using depth test) and rendering I have a new mesh, but I don’t know it’s triangles’s count and vertexes. I just have a rendered image of a new object.
The question is how to get all information about this new object? I tried to use feedback rendering mode, but in feedback buffer I found all two meshe’s triangles, even invisible one.

You can read the contents of a variety of buffer by simply mapping it to client space using glMapBuffer(). On the part of doing CSG kind of stuff with transform feedback I’m not sure. I don’t think this is the way it can be done.

Sounds like you want CSG - constructive solid geometry. You would need to use a 3rd party library or write your own CSG code.