From 6805e392a78396b7ca0de0d63116b7d6948c02d0 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 20 Sep 2020 16:42:44 +0200 Subject: [PATCH] source/Platform/Win32/Win32GLContext.cpp: in createGLContext() delete temporary context as the last step. --- source/Platform/Win32/Win32GLContext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/Platform/Win32/Win32GLContext.cpp b/source/Platform/Win32/Win32GLContext.cpp index 13bb7d4..4215580 100644 --- a/source/Platform/Win32/Win32GLContext.cpp +++ b/source/Platform/Win32/Win32GLContext.cpp @@ -105,10 +105,6 @@ void Win32GLContext::createGLContext() ensureExtensionsLoaded(m_deviceContext); - // Dont need to old one anymore. - wglMakeCurrent(m_deviceContext, NULL); - ::wglDeleteContext(tmpDC); - // TODO: For now.. We force 3.2 Core but this should not be implementation specific. // The Display class should force that for all GLContext Implementations. @@ -121,6 +117,10 @@ void Win32GLContext::createGLContext() // Create real context. m_renderContext = ::wglCreateContextAttribsARB(m_deviceContext, 0, attriblist); + + // Dont need the old one anymore. + wglMakeCurrent(m_deviceContext, NULL); + ::wglDeleteContext(tmpDC); } bool Win32GLContext::activate()