add RendererSDL3

This commit is contained in:
2025-05-05 16:16:56 -05:00
parent b8654659c7
commit 0fb63352a2
8 changed files with 143 additions and 44 deletions

View File

@@ -3,6 +3,7 @@
#include "pch.hpp"
#include "RendererOpenGL/RendererOpenGL.h"
#include "RendererSDL3/RendererSDL3.h"
namespace Archimedes {
class Renderer {
@@ -10,9 +11,11 @@ namespace Archimedes {
public:
int w, h;
Renderer(void* p = nullptr) : ptr(p) {}
~Renderer() {}
bool init() { return r.init(); }
bool init() { return r.init(ptr); }
void render() {
r.render(rc, w, h);
@@ -22,9 +25,12 @@ namespace Archimedes {
return rc;
}
RendererImpl& getRendererImpl() { return r; }
private:
std::list<std::function<void()>> rc;
RendererImpl r;
void* ptr;
};
}