mesh possibilities?

Can I create a mesh with border of custom thickness and options to inset, outset and center the stroke on shapes bounding? The idea is to be able to create all kind of shapes through one object - mesh(). But it has to have all those styling options available to it, as line(), rect(), etc.
Is that possible somehow? My first idea would be texture… but somehow I dislike this idea.

Ofcourse its possible, if you create a mesh you can use line() to outline the mesh and you can use the vertices of a square to make the rect() function, if that’s what you mean?

I dont want to use line(), rect(), etc at all! Only mesh(), because of shader possibilities. So how should I style my mesh objects with stroke and fill? Should I “bake” everything somehow to texture or what would be an appropriate and memory-saving way?

Bake to texture since you don’t want to stylize it. Otherwise, you’d have to make a shader that somehow did all that work for you - messy.

Using the line(), etc functions should work for you better though because at the end of the day, they all will still be OpenGL calls - just not at the shader / pixel level.