Preview in viewport using OpenGL shader I am trying to apply a custom shader (OpenGL, but if that's not possible I can learn OSL) to a STL. I will not use any lights, cameras, I'm not going to render it eventually. I would like to have the preview in realtime only to see how mesh modifications affect the colors (coming from the shader only) on its surface.

So in practice I want to be able to compute final color value for each and every place on the surface using the shader. Something like this, where you are given coordinates, and the shader computes colors.

The issue I'm having is the multitude of sources: they refer to different Blender versions with different hardware specs, multiple renderers (which apparently changed in Blender 2.8*), BI/BGE, Nodes, Circles, Eeevee, etc. This causes online tutorials to be incompatible with each other.

Without having much experience with it I am trying to find out whether Blender can be used as a inspection/modification tool in such a way as I described above.

Is this doable? How?
You can use viewport draw callback for rendering in the viewport. In your case, I would think of rendering a mesh with a small bias offset over existing meshes to avoid Z-fighting. Then making this mesh semi-transparent with appropriate blending modes to overlay the underlying geometry. Also do not forget to enable depth testing. You can use the GPU module and BGL modules for achieving that.