mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-15 06:58:37 +02:00
Implement AbstractGfx for Software & Null
This commit is contained in:
@ -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,23 +106,13 @@ bool VideoSoftware::Initialize(const WindowSystemInfo& wsi)
|
||||
Clipper::Init();
|
||||
Rasterizer::Init();
|
||||
|
||||
g_renderer = std::make_unique<SWRenderer>(std::move(window));
|
||||
g_gfx = std::make_unique<SWGfx>(std::move(window));
|
||||
g_bounding_box = std::make_unique<SWBoundingBox>();
|
||||
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;
|
||||
}
|
||||
InitializeShared();
|
||||
|
||||
g_shader_cache->InitializeShaderCache();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user