legatt 0062aa85e5 Renderer thread base
- Renderer class
- Vulkan and RmlUi moved from main to Renderer thread
2025-08-08 20:25:47 +03:00

31 lines
495 B
C++

#pragma once
#include <thread>
#include <atomic>
#include <SDL2/SDL.h>
#include <SDL2/SDL_vulkan.h>
#include <vulkan/vulkan.h>
#include <RmlUi/Core.h>
class Renderer
{
private:
std::stop_token *stoken;
std::jthread renderThread;
SDL_Window *window;
VkInstance vulkan;
Rml::Context *uiContext;
void Threading();
void Loop();
void Release();
public:
std::atomic<bool> isRunning;
Renderer(SDL_Window *window);
void Start();
void Stop();
};