diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-28 14:53:19 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 19:41:23 +1300 |
| commit | 58b70b2fb2abac12dddd947a69f7fa5b41b1a8b7 (patch) | |
| tree | f053add433fb414fd60cf74f24641d001c0bf664 /Source/Core/VideoBackends/OGL/OGLMain.cpp | |
| parent | d37f83ffeba218c6ef94b78532aed50b1ebbc4a4 (diff) | |
Don't set common globals from Video Backends
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLMain.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLMain.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLMain.cpp b/Source/Core/VideoBackends/OGL/OGLMain.cpp index a36d9f99a4..c47b94ceb8 100644 --- a/Source/Core/VideoBackends/OGL/OGLMain.cpp +++ b/Source/Core/VideoBackends/OGL/OGLMain.cpp @@ -187,17 +187,16 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) if (!InitializeGLExtensions(main_gl_context.get()) || !FillBackendInfo()) return false; - g_gfx = std::make_unique<OGLGfx>(std::move(main_gl_context), wsi.render_surface_scale); + auto gfx = std::make_unique<OGLGfx>(std::move(main_gl_context), wsi.render_surface_scale); ProgramShaderCache::Init(); - - g_vertex_manager = std::make_unique<VertexManager>(); - g_perf_query = GetPerfQuery(); g_sampler_cache = std::make_unique<SamplerCache>(); - g_bounding_box = std::make_unique<OGLBoundingBox>(); - InitializeShared(); + auto vertex_manager = std::make_unique<VertexManager>(); + auto perf_query = GetPerfQuery(gfx->IsGLES()); + auto bounding_box = std::make_unique<OGLBoundingBox>(); - return true; + return InitializeShared(std::move(gfx), std::move(vertex_manager), std::move(perf_query), + std::move(bounding_box)); } void VideoBackend::Shutdown() |
