Solid Wireframe shader

Is there an example of how to create a solid wireframe shader in GLSL? Could someone point me to any resources that might hint as to a direction?

I’m thinking something like this:


This and the chapter on “Using Geometry and the Tesselation Shaders” from “OpenGL 4.0 Shading Language Cookbook” by David Wolff (2011, Packt Pub.) is also worth taking a look at.