summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWmain.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2015-09-26 10:07:48 +0200
committerdegasus <wickmarkus@web.de>2015-10-14 00:13:54 +0200
commit61c3a0d9e45a587e8fb5e5770eb4db05386bed5f (patch)
tree7e3f09a4c080379d6e59a5dc6076f1eb687e733b /Source/Core/VideoBackends/Software/SWmain.cpp
parentb0bbe52cc96c8182dc46dec20c10d14f05a133db (diff)
VideoSW: Split up OGL window handling
This removes OSD support for video software, but it was already broken before. This commit does not try to fix coding style issues, the rewrite of this presentation API is splitted up.
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index ba74f320c8..7b55bb0971 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -8,9 +8,6 @@
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
-#include "Common/GL/GLInterfaceBase.h"
-#include "Common/GL/GLUtil.h"
-#include "Common/GL/GLExtensions/GLExtensions.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h"
@@ -26,6 +23,7 @@
#include "VideoBackends/Software/OpcodeDecoder.h"
#include "VideoBackends/Software/Rasterizer.h"
#include "VideoBackends/Software/SWCommandProcessor.h"
+#include "VideoBackends/Software/SWOGLWindow.h"
#include "VideoBackends/Software/SWRenderer.h"
#include "VideoBackends/Software/SWStatistics.h"
#include "VideoBackends/Software/SWVertexLoader.h"
@@ -81,13 +79,7 @@ bool VideoSoftware::Initialize(void *window_handle)
{
g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + GetConfigName() + ".ini").c_str());
- InitInterface();
- GLInterface->SetMode(GLInterfaceMode::MODE_DETECT);
- if (!GLInterface->Create(window_handle, false))
- {
- INFO_LOG(VIDEO, "GLInterface::Create failed.");
- return false;
- }
+ SWOGLWindow::Init(window_handle);
InitBPMemory();
InitXFMemory();
@@ -165,31 +157,16 @@ void VideoSoftware::Shutdown()
// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
- GLInterface->Shutdown();
- delete GLInterface;
- GLInterface = nullptr;
+ SWOGLWindow::Shutdown();
}
void VideoSoftware::Video_Cleanup()
{
- GLInterface->ClearCurrent();
}
// This is called after Video_Initialize() from the Core
void VideoSoftware::Video_Prepare()
{
- GLInterface->MakeCurrent();
-
- // Init extension support.
- if (!GLExtensions::Init())
- {
- ERROR_LOG(VIDEO, "GLExtensions::Init failed!Does your video card support OpenGL 2.0?");
- return;
- }
-
- // Handle VSync on/off
- GLInterface->SwapInterval(VSYNC_ENABLED);
-
// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_INIT);
@@ -367,7 +344,7 @@ void VideoSoftware::RegisterCPMMIO(MMIO::Mapping* mmio, u32 base)
// Draw messages on top of the screen
unsigned int VideoSoftware::PeekMessages()
{
- return GLInterface->PeekMessages();
+ return SWOGLWindow::s_instance->PeekMessages();
}
}