I’m learning about the added GS primitives and have some questions.

Q1. Regarding the lines/triangles with adjacency primitives: When I specify the vertex data in the application code, how do I indicate that an edge does not have an adjacent vertex? For example, assume I am using triangles with adjacency and the current triangle is at the edge of the geometry and one of the triangles edges does not have an adjacent vertex…

Q2. Is there a library (hopefully open source) that will take in arbitrary geometry vertex data (made of triangles) and output the same geometry described in triangles with adjacency (instead of simply triangles). I would also love a link to a good algorithm and description of the algo if possible.

Thanks.