I understand, however, I am not using SDL for what most people are.
I don’t yet care about CPU vs GPU rendering stuff, I am at the explore logic stage.
The ability to alter or customize an existing program is not enough for me.
I have no specific goal beyond understanding the logic behind the guis themselves.
What I have done is allocate a surface I called Gripe.
When I read in a graphic or render a font, it is to Gripe.
I then use SDL_ConvertSurfaceFormat to give the final surface a predictable format made from whatever format Gripe is in this time…
I have written a crude routine of add border of color and width to a surface of known format.
Currently just altering existing pixels, next is adding the border to the outside, perhaps with padding inside or outside it.
Then I am going to try to give it things like rounded corners.
After that, maybe add shadows.
I can adapt the pixel alterations and coordinate adjustments to match other formats if I ever need to once the logic is done…
Get away from this “Modern” flat contrastless space wasting logic defying what is in my eyes pure unadulterated garbage calling itself an interface. W8+ and its ilk.
Sorry, that came out stronger than I intended.
I find “Modern” unusable.
I am used to the interface, whatever form it takes, and the job flowing together consistently.
Or to put it plainly, a zero knowledge system where the interface provides a starting place which the job then helps you navigate as you go.
My long term goal here is make a gui backend that makes sense to me.
I have tried to follow WxWidgets and SDL both, and gotten lost.
I tried to follow Gecko and Blink, but again, got lost.
The abstractions and platform specifics are to much for my current level of knowledge.
For now, I am sticking with Visualstudio, VS not VSC, which is a flat contrastless morass.
It also lacks things I use.
CB & CL despite my best efforts, just don’t work for me, perhaps later.
Ironically, I started in on SDL because phpsdl compiled easily, and phpwx didn’t.
I use php a lot for stuff, so it gave me a place to start.
Try and retry without having to recompile is nice.
I did than until I had a starting place, now I am playing in C/C++, and having lots of fun with pointer ping pong.
Amusingly one rule I learned in pascal is even truer in C++.
An object, or class in C++, is a collection of values, and the means to manipulate them.
Making the values themselves private, and the interface to use them public has saved me so much time and effort so far.
The derived classes look a little funny reading them, but with an inline setting for get and set values in the parent classes, there is zero overhead at the assembly level when getting or setting values in a parent class vs the child.
You have to be careful of the size of functions you inline, which is why I keep it to get & set inline, but leave the rest as normal calls.