diff options
| author | flacs <tilkax@gmail.com> | 2015-10-17 04:56:44 +0200 |
|---|---|---|
| committer | flacs <tilkax@gmail.com> | 2015-10-17 04:56:44 +0200 |
| commit | d85344bd58afc6594d01d65ed9ef46471a7cf2ed (patch) | |
| tree | 7d857b8cb30e648bc74b2a0aba4351ec82d5524f /Source/Core/VideoBackends/Software/SWmain.cpp | |
| parent | c0d157e6f6d4e482d7639bc9af05a21090a34ec4 (diff) | |
| parent | b69bff069055b32fc759d7722a773dc355c6b459 (diff) | |
Merge pull request #3155 from degasus/videosw
VideoSW: Split up OGL window handling
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWmain.cpp | 31 |
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(); } } |
