Built in shader?

One shape I need to draw often is rounded rectangles (filled in; I don’t think I ever need an outline). I know SDL gfx can do that, but I was thinking maybe a shader would be more efficient?

Would it be a good idea to have common shaders built in? I think I only need rounded rects but I imagine circles, ovals, and maybe box shadows would all be common enough and simple enough to supported?

1 Like

I know its not a solution for the topic, but I’ve found a video from Pezzza’s Work. He draws rounded rectangles using SFML, but the code can be easily adapted to work with SDL. It doesn’t use shaders, just vertex arrays

1 Like