Draw edge outline similar to overlay using gpu module

Hi folks!
I’m trying to do some experiments with drawing in 3d viewport.
So far I have a question about drawing shaders similar to overlays like edges (outline on outer sides).
Is there a way to make it work?


Hi, thanks for response!
I know how to draw and manipulate lines using built-in shaders in 3d view. My question is mainly about specific types of shaders like one in overlays. As far as I understand I can throw some custom glsl stuff, but maybe there is way to use blender ones?
Furthermore, the line drawing method, the one I provided on screenshot, uses geometric shader which not supported in Python I suppose.

There’s no ‘built in’ way to do it, it’s all just basic GL stuff. The shader itself does not make it ‘overlay’, that’s just glBlendFunc at work.

Not really sure what you mean by this. Blender’s GL implementation supports geometry shaders.