Setting up SDL3 in Visual Studio 2022 using CMake
        
            - Install SDL 3.1.10 using this guide: How to install SDL 3.1.10 using CMake and Visual Studio 2022 for Desktop
 
            - Run Visual Studio
 
            - Click on the "Create a new project" button:
 
            
            - Click on the "CMake Project" and click on the "Next" button:
 
            
            - Type a project name, set a project location, check the "Place solution and project in the same direcory" checkbox, and click on the "Create" button:
 
            
            - Wait a few seconds for configuration
 
            - Run the project on the empty green triangle (or Ctrl+F5):
 
            
            - The program prints "Hello CMake" to the console:
 
            
            - Click on the "Project" and click on the "Edit CMake Presents for hello-sdl3-cpp":
 
            
            - Add the "SDL3" variable with the following "value" and "type" for "Debug":
 
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug",
                "SDL3": {
                    "value": "E:/libs/sdl-3.1.10-msvc/win/debug/cmake",
                    "type": "PATH"
                }
            }
            Make the same for "Release":
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Release",
                "SDL3": {
                    "value": "E:/libs/sdl-3.1.10-msvc/win/release/cmake",
                    "type": "PATH"
                }
            }
            Add this lines to the "CMakeLists.txt" file:
find_package(SDL3)
target_link_libraries(hello-sdl3-cpp PRIVATE SDL3::SDL3)
            Replace the "hello-sdl3-cpp.cpp" file content with with content:
#define SDL_MAIN_USE_CALLBACKS 1 // Use callbacks instead of main()
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static SDL_Window* window = NULL;
static SDL_Renderer* renderer = NULL;
SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[])
{
    if (!SDL_Init(SDL_INIT_VIDEO)) {
        SDL_Log("Couldn't initialize SDL: %s", SDL_GetError());
        return SDL_APP_FAILURE;
    }
    if (!SDL_CreateWindowAndRenderer("Example",
        400, 300, 0, &window, &renderer))
    {
        SDL_Log("Couldn't create window/renderer: %s", SDL_GetError());
        return SDL_APP_FAILURE;
    }
    // SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
    SDL_SetRenderVSync(renderer, 1); // Turn on vertical sync
    return SDL_APP_CONTINUE;
}
SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
{
    if (event->type == SDL_EVENT_QUIT) {
        return SDL_APP_SUCCESS;
    }
    return SDL_APP_CONTINUE;
}
SDL_AppResult SDL_AppIterate(void* appstate)
{
    SDL_SetRenderDrawColor(renderer, 33, 33, 33, SDL_ALPHA_OPAQUE); // Canvas color
    SDL_RenderClear(renderer); // Clear the canvas and fill it with the canvas color
    SDL_RenderPresent(renderer);  // Display the contents of the drawer on the screen
    return SDL_APP_CONTINUE;
}
// ------------------------------------------------------------
void SDL_AppQuit(void* appstate, SDL_AppResult result)
{
    // Window and renderer will be automatically removed
}
            
            Press Ctrl+F5 to run the application
            Official examples to study: https://github.com/libsdl-org/SDL/tree/main/examples/renderer