PDA

View Full Version : How to get vertexes from OpenGL



HMD_Dmitry
07-04-2012, 04:59 AM
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.

thokra
07-04-2012, 07:37 AM
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.

V-man
07-07-2012, 06:05 PM
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.

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