Wish the GPU compiles pipeline "circle" { {vec2 center float radius float thickness vec4 color int filled} { float r = radius + thickness; vec2 vertices[4] = vec2[4]( center - r, vec2(center.x + r, center.y - r), vec2(center.x - r, center.y + r), center + r ); return vertices[gl_VertexIndex]; } { float dist = length(gl_FragCoord.xy - center) - radius; if (filled == 1) { return (dist < thickness) ? color : vec4(0, 0, 0, 0); } else { return (dist < thickness && dist > 0.0) ? color : vec4(0, 0, 0, 0); } } } When /someone/ wishes to draw a circle with /...options/ { set center [dict_getdef $options center ""] if {$center eq ""} { set center [list [dict get $options x] [dict get $options y]] } set radius [dict get $options radius] set thickness [dict get $options thickness] set color [getColor [dict get $options color]] set filled [dict_getdef $options filled false] set layer [dict_getdef $options layer 0] Wish the GPU draws pipeline "circle" with arguments \ [list $center $radius $thickness $color [expr {$filled eq false ? 0 : 1}]] \ layer $layer }