Introduce "Renderer" abstraction layer

Adds a `renderer` class for which a rendering backend must implement and
will conditionally use OpenGL in the case that `ENABLE_GL` is enabled.
This commit is contained in:
Wunkolo 2023-07-10 08:53:16 -07:00
parent d664d5caf0
commit 2a1683ba62
9 changed files with 224 additions and 156 deletions

View file

@ -16,7 +16,7 @@ _declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 1;
}
#endif
Emulator::Emulator() : kernel(cpu, memory, gpu), cpu(memory, kernel), gpu(memory, gl, config), memory(cpu.getTicksRef()) {
Emulator::Emulator() : kernel(cpu, memory, gpu), cpu(memory, kernel), gpu(memory, config), memory(cpu.getTicksRef()) {
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS) < 0) {
Helpers::panic("Failed to initialize SDL2");
}