I want to create my own 2D graphics library using signed distance functions where everything is drawn on the GPU. Browsing the web I quickly found Inigo Quilez website that describes how to draw basic shapes with signed distance functions. I can work out the math on my own and come up with toy examples using Shadertoy. The problem I have is that I do not understand how I could I can call a function like drawCircle(...) from "normal" C code on the CPU to trigger the call to a function that draws a circle in a fragment shader. Of course I could draw the circle to a texture and send this to the GPU but that would not use the GPU for drawing.
What would be a reasonable software design where one could invoke draw calls from the CPU using a painters model and then these would be executed on the GPU in a fragment shader?