I don't know if this is done much, never heard of it, but it seems feasible. Instead of writing a program that outputs to drive a certain type of display, write it to connect to a VNC client. Then somebody that wants to use it provides a VNC client for their hardware, either locally or remotely.
I'm considering writing a GUI program that outputs to a Raspi framebuffer. I want motion, which is difficult under X without something like OpenGL. Except I'd like to be able to run it from my OpenBSD machines too but there's no framebuffer there. VNC is essentially Remote Frame Buffer. There's even a VNC client for Androids, I have one on a phone. This would be different from running a VNC server and the program on a computer, the program could output to what it thinks is a local framebuffer but it could actually be remote (or local). I haven't seen a good description of the protocol yet from a programming standpoint. Seems like it could be handled by linking in a library. On the client machine it would be just another window, I'm not sure what I'd do about forwarding mouse and keyboard events.
https://en.wikipedia.org/wiki/RFB_protocol and
https://en.wikipedia.org/wiki/Virtual_Network_Computing