So, given a number of polygons that have been divided into triangles and saved in an sf::VertexArray(sf::PrimitiveType::Triangles), where no polygon shares points with another, how can I make something of an outline on every side of every triangle if each two points of the line are (a) not part of any other triangle in the array at the same time (so the side isn't shared with another triangle) and (b) at least one of the two is no inside any other triangle in the array.
Basically, here's a picture of what I have at the moment:
http://i.imgur.com/LWSEa9U.pngAnd here is what the outline I am talking about is supposed to look like:
http://i.imgur.com/4UJ5f5l.pngAs far as I know, this should be done with shaders; unfortunately, that's all I am certain of regarding this problem. How could I go about achieving this?