summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWmain.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@users.noreply.github.com>2018-10-24 14:51:21 +1100
committerGitHub <noreply@github.com>2018-10-24 14:51:21 +1100
commitc4d1e4adffcd380cc87b841069ce2fe8b62d7b60 (patch)
treec61a0a07c14ccc3c1f7247bdcc82927a82c145bb /Source/Core/VideoBackends/Software/SWmain.cpp
parent9c9d598ec006527bc47aea306e5171d03c12c5f5 (diff)
parent2c6d96433c322b50470705d43005fd6308506d49 (diff)
Merge pull request #7450 from stenzek/glcontext
GLInterface refactoring/cleanup and runtime platform selection
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index 6ca183b57c..a0ad349849 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -9,7 +9,7 @@
#include "Common/Common.h"
#include "Common/CommonTypes.h"
-#include "Common/GL/GLInterfaceBase.h"
+#include "Common/GL/GLContext.h"
#include "VideoBackends/Software/Clipper.h"
#include "VideoBackends/Software/DebugUtil.h"
@@ -78,20 +78,19 @@ void VideoSoftware::InitBackendInfo()
g_Config.backend_info.AAModes = {1};
}
-bool VideoSoftware::Initialize(void* window_handle)
+bool VideoSoftware::Initialize(const WindowSystemInfo& wsi)
{
InitializeShared();
- SWOGLWindow::Init(window_handle);
+ std::unique_ptr<SWOGLWindow> window = SWOGLWindow::Create(wsi);
+ if (!window)
+ return false;
Clipper::Init();
Rasterizer::Init();
DebugUtil::Init();
- GLInterface->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();
@@ -116,4 +114,4 @@ void VideoSoftware::Shutdown()
g_renderer.reset();
ShutdownShared();
}
-}
+} // namespace SW