i don't think you've quite set this up correctly.
i've modified your patch to capture the gl.mesh to a texture using gl.node.
this texture is sent to the left input of the alphaglue slab, and the video "mask" is sent to the right input.
this creates a texture with an alpha channel based on the luminance of the mask.
to actually see the mask effect, you need to enable @blend_enable and disable @depth_enable on the videoplane that is displaying the texture.
you can now change the background color with the gl.render @erase_color, and the line color with gl.mesh @color.
Thank you Robert, now it works just like I wanted.
By the way, I added a little "roundness" to the lines modifying the expression in jit.vexpr and sent all the video elaborations in gl using jit.slab and jit.gl.pix. I think it's a little more efficient, now