diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-27 13:21:09 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 18:46:04 +1300 |
| commit | f0336a3129ea431862e6e3bf1ccf51a384cf3f57 (patch) | |
| tree | cb768f2b19285d5966636e5e80c01c5553977632 /Source/Core/VideoBackends/OGL/OGLMain.cpp | |
| parent | 8a236293455e9a71aa6fb400a6253c27540e403b (diff) | |
Implement AbstractGfx for OpenGL
Mostly involves moving contents of OGLRender
to OGLGfx and OGLConfig
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLMain.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLMain.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLMain.cpp b/Source/Core/VideoBackends/OGL/OGLMain.cpp index f8ed07dc94..a36d9f99a4 100644 --- a/Source/Core/VideoBackends/OGL/OGLMain.cpp +++ b/Source/Core/VideoBackends/OGL/OGLMain.cpp @@ -46,8 +46,10 @@ Make AA apply instantly during gameplay if possible #include "Core/Config/GraphicsSettings.h" +#include "VideoBackends/OGL/OGLBoundingBox.h" +#include "VideoBackends/OGL/OGLConfig.h" +#include "VideoBackends/OGL/OGLGfx.h" #include "VideoBackends/OGL/OGLPerfQuery.h" -#include "VideoBackends/OGL/OGLRender.h" #include "VideoBackends/OGL/OGLVertexManager.h" #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/SamplerCache.h" @@ -185,26 +187,16 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) if (!InitializeGLExtensions(main_gl_context.get()) || !FillBackendInfo()) return false; - InitializeShared(); - g_renderer = std::make_unique<Renderer>(std::move(main_gl_context), wsi.render_surface_scale); + g_gfx = std::make_unique<OGLGfx>(std::move(main_gl_context), wsi.render_surface_scale); ProgramShaderCache::Init(); + g_vertex_manager = std::make_unique<VertexManager>(); - g_shader_cache = std::make_unique<VideoCommon::ShaderCache>(); - g_framebuffer_manager = std::make_unique<FramebufferManager>(); g_perf_query = GetPerfQuery(); - g_texture_cache = std::make_unique<TextureCacheBase>(); g_sampler_cache = std::make_unique<SamplerCache>(); + g_bounding_box = std::make_unique<OGLBoundingBox>(); - if (!g_vertex_manager->Initialize() || !g_shader_cache->Initialize() || - !g_renderer->Initialize() || !g_framebuffer_manager->Initialize() || - !g_texture_cache->Initialize()) - { - PanicAlertFmtT("Failed to initialize renderer classes"); - Shutdown(); - return false; - } + InitializeShared(); - g_shader_cache->InitializeShaderCache(); return true; } |
