As discussed on IRC: I ran into this issue when trying to emulate Plugdata GUI for DPF plugins.
Particularly subpatches require "clipping" their "internal" objects when on top of other objects:
Plugdata uses a fork of nanovg that uses extensive GL shaders for rendering as well (for speed and anti aliasing), so this is likely non-trivial to port: https://github.com/timothyschoen/nanovg