mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
GLContext: Use destructor instead of Shutdown() to cleanup
Also uses the Initialize() method to make the context current.
This commit is contained in:
@ -13,15 +13,7 @@
|
||||
#include "VideoBackends/Software/SWTexture.h"
|
||||
|
||||
SWOGLWindow::SWOGLWindow() = default;
|
||||
|
||||
SWOGLWindow::~SWOGLWindow()
|
||||
{
|
||||
if (m_gl_context)
|
||||
{
|
||||
m_gl_context->ClearCurrent();
|
||||
m_gl_context->Shutdown();
|
||||
}
|
||||
}
|
||||
SWOGLWindow::~SWOGLWindow() = default;
|
||||
|
||||
std::unique_ptr<SWOGLWindow> SWOGLWindow::Create(const WindowSystemInfo& wsi)
|
||||
{
|
||||
@ -46,8 +38,6 @@ bool SWOGLWindow::Initialize(const WindowSystemInfo& wsi)
|
||||
if (!m_gl_context)
|
||||
return false;
|
||||
|
||||
m_gl_context->MakeCurrent();
|
||||
|
||||
// Init extension support.
|
||||
if (!GLExtensions::Init(m_gl_context.get()))
|
||||
{
|
||||
|
Reference in New Issue
Block a user