1
0
Fork 0

source/Platform/Win32/Win32GLContext.cpp: skip goto in createGLContext()

This commit is contained in:
Henrik Hautakoski 2024-07-05 01:02:59 +02:00
parent f71fdea463
commit e73d1f7f90

View file

@ -100,10 +100,7 @@ void Win32GLContext::createGLContext()
tmpDC = ::wglCreateContext(m_deviceContext);
::wglMakeCurrent(m_deviceContext, tmpDC);
if (!ensureExtensionsLoaded(m_deviceContext)) {
goto err;
}
if (ensureExtensionsLoaded(m_deviceContext)) {
// 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.
@ -116,8 +113,8 @@ void Win32GLContext::createGLContext()
// Create real context.
m_renderContext = ::wglCreateContextAttribsARB(m_deviceContext, 0, attriblist);
}
err:
// Dont need the old one anymore.
wglMakeCurrent(m_deviceContext, NULL);
::wglDeleteContext(tmpDC);