Code snip not necessary. Can be done by recent version of program Meshlab. (free, and work on Mac OSX, Linux compiled .deb for Ubuntu, and Windows)
This much easier than write X-Ray shader for GL from begin. Coloration must be after choice of shader, or it reset of grey.
Colour similar to scheme in Kawasaki render, must select Filter > colour (& something else, not remember, program interface not open now) > Per Vertex Quality. Then, in setting dialog that open, enable all option box. If want green, then other option in colour filters must be experiment with.
If then intention is to use Renderman , export as Wavefront.obj, open Obj in Renderman friendly program that enable layer shaders, and can add for example RC Glow shader after X-Ray shader.
If not export, but keep entire scene creation in Meshlab, can be done by snapshot. Set screen multiplier to make screenshot render x time larger than viewport. I use 10x, for good resolution that scale down to high DPI medium size image. Then add glow by GIMP filter.