diff options
| author | Stenzek <stenzek@gmail.com> | 2018-10-03 23:03:26 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2018-10-20 21:11:34 +1000 |
| commit | dcdd02d646230e7903520a41dc9f86e57ae16dbe (patch) | |
| tree | 600f49146250708874ef1d7ddf6380c8a829646a /Source/Core/VideoBackends/Software/SWmain.cpp | |
| parent | eb284b5d661cab6aed770e0e51b790917249ef21 (diff) | |
GLContext: Remove global context pointer
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWmain.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index 070cf74b69..a0ad349849 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -82,16 +82,15 @@ bool VideoSoftware::Initialize(const WindowSystemInfo& wsi) { InitializeShared(); - SWOGLWindow::Init(wsi); + std::unique_ptr<SWOGLWindow> window = SWOGLWindow::Create(wsi); + if (!window) + return false; Clipper::Init(); Rasterizer::Init(); DebugUtil::Init(); - g_main_gl_context->MakeCurrent(); - SWOGLWindow::s_instance->Prepare(); - - g_renderer = std::make_unique<SWRenderer>(); + g_renderer = std::make_unique<SWRenderer>(std::move(window)); g_vertex_manager = std::make_unique<SWVertexLoader>(); g_perf_query = std::make_unique<PerfQuery>(); g_texture_cache = std::make_unique<TextureCache>(); @@ -108,7 +107,6 @@ void VideoSoftware::Shutdown() g_renderer->Shutdown(); DebugUtil::Shutdown(); - SWOGLWindow::Shutdown(); g_framebuffer_manager.reset(); g_texture_cache.reset(); g_perf_query.reset(); |
