>>3811626I guess so, yeah, what did you have in mind? Also I'm not really any good with Assembly besides once or twice using inline assembly blocks and that was purely for experimentation.
>>3811718> Is it just to remove some of the busywork, or is there something deeper I'm not understanding?I guess you could write your own wrapper, but I would rather just use a wrapper someone else wrote and tested already and save myself the trouble. The idea is instead of manually using SDL_CreateWindow/SDL_DestroyWindow, just using an object like sdl::Window and calling a constructor and destructor as needed. Or even having a class sdl::Window call SDL_CreateWindow and store it in a smart pointer so you can just avoid all manual allocation.
Also method syntax is just nicer, I prefer to use
sdl::Window win(/* your parameters here */);
win.maximizeWindow();
win.minimizeWindow();
win.restoreWindow();
over
SDL_Window* win = SDL_CreateWindow(/* your parameters here */);
SDL_MaximizeWindow(win);
SDL_MinimizeWindow(win);
SDL_RestoreWindow(win);
>I genuinely did not know C++ had this lol.Modules were added in C++20 but compilers only started have somewhat decent support for them maybe a year ago, and honestly C++ should've added it years ago. Basically instead of writing #include <SDL3/SDL.h>
you could theoretically write something like
import sdl;
and just import the symbols in the library like that.
The idea is that because they don't rely on the preprocessor, you can just compile them once instead of compile them in every file you include them in which is faster to compile, also you can manually control what the library exposes by marking symbols export.
Generally a pretty great feature, if they introduced it a few decades ago it as they should have it would be way more popular than it is now.
Modern C++ is only starting to get features most modern languages like Rust or even Java and C# have had for a while now, lol