diff options
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWmain.cpp | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index b6d2005c26..8703ea4b4d 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -16,6 +16,8 @@ #include "VideoBackends/Software/Clipper.h" #include "VideoBackends/Software/EfbInterface.h" #include "VideoBackends/Software/Rasterizer.h" +#include "VideoBackends/Software/SWBoundingBox.h" +#include "VideoBackends/Software/SWGfx.h" #include "VideoBackends/Software/SWOGLWindow.h" #include "VideoBackends/Software/SWRenderer.h" #include "VideoBackends/Software/SWTexture.h" @@ -23,6 +25,7 @@ #include "VideoBackends/Software/TextureCache.h" #include "VideoCommon/FramebufferManager.h" +#include "VideoCommon/Present.h" #include "VideoCommon/TextureCacheBase.h" #include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoConfig.h" @@ -96,8 +99,6 @@ void VideoSoftware::InitBackendInfo() bool VideoSoftware::Initialize(const WindowSystemInfo& wsi) { - InitializeShared(); - std::unique_ptr<SWOGLWindow> window = SWOGLWindow::Create(wsi); if (!window) return false; @@ -105,40 +106,14 @@ bool VideoSoftware::Initialize(const WindowSystemInfo& wsi) Clipper::Init(); Rasterizer::Init(); - g_renderer = std::make_unique<SWRenderer>(std::move(window)); - g_vertex_manager = std::make_unique<SWVertexLoader>(); - g_shader_cache = std::make_unique<VideoCommon::ShaderCache>(); - g_framebuffer_manager = std::make_unique<FramebufferManager>(); - g_perf_query = std::make_unique<PerfQuery>(); - g_texture_cache = std::make_unique<TextureCache>(); - - if (!g_vertex_manager->Initialize() || !g_shader_cache->Initialize() || - !g_renderer->Initialize() || !g_framebuffer_manager->Initialize() || - !g_texture_cache->Initialize()) - { - PanicAlertFmt("Failed to initialize renderer classes"); - Shutdown(); - return false; - } - - g_shader_cache->InitializeShaderCache(); - return true; + return InitializeShared(std::make_unique<SWGfx>(std::move(window)), + std::make_unique<SWVertexLoader>(), std::make_unique<PerfQuery>(), + std::make_unique<SWBoundingBox>(), std::make_unique<SWRenderer>(), + std::make_unique<TextureCache>()); } void VideoSoftware::Shutdown() { - if (g_shader_cache) - g_shader_cache->Shutdown(); - - if (g_renderer) - g_renderer->Shutdown(); - - g_texture_cache.reset(); - g_perf_query.reset(); - g_framebuffer_manager.reset(); - g_shader_cache.reset(); - g_vertex_manager.reset(); - g_renderer.reset(); ShutdownShared(); } } // namespace SW |
