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()