I have been creating a simple chart gui element using raylib and soon noticed that lines always draw behind everything else.
I am trying to fill the background of my gui element with a solid color and then draw my charts on top of it. However my background rectangle always ends up being drawn over on top of the lines of my chart. The only solution i could find is drawing all the lines in to a framebuffer and then drawing the frame buffer on top of the rectangle. This sounds like a bad resource hungry way to do it.
Is there a better way of getting lines to draw in front of polygons?