1
0
Fork 0

source/Platform/Win32/Win32GLContext.cpp: in createGLContext() delete temporary context as the last step.

This commit is contained in:
Henrik Hautakoski 2020-09-20 16:42:44 +02:00
parent 92a561648e
commit 6805e392a7

View file

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