source/Platform/Win32/Win32GLContext.cpp: skip goto in createGLContext()
This commit is contained in:
parent
f71fdea463
commit
e73d1f7f90
1 changed files with 13 additions and 16 deletions
|
|
@ -100,24 +100,21 @@ void Win32GLContext::createGLContext()
|
||||||
tmpDC = ::wglCreateContext(m_deviceContext);
|
tmpDC = ::wglCreateContext(m_deviceContext);
|
||||||
::wglMakeCurrent(m_deviceContext, tmpDC);
|
::wglMakeCurrent(m_deviceContext, tmpDC);
|
||||||
|
|
||||||
if (!ensureExtensionsLoaded(m_deviceContext)) {
|
if (ensureExtensionsLoaded(m_deviceContext)) {
|
||||||
goto err;
|
// 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.
|
||||||
|
|
||||||
|
int attriblist[] = {
|
||||||
|
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||||
|
WGL_CONTEXT_MINOR_VERSION_ARB, 2,
|
||||||
|
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||||
|
0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// Create real context.
|
||||||
|
m_renderContext = ::wglCreateContextAttribsARB(m_deviceContext, 0, attriblist);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
int attriblist[] = {
|
|
||||||
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
|
|
||||||
WGL_CONTEXT_MINOR_VERSION_ARB, 2,
|
|
||||||
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
|
|
||||||
0, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
// Create real context.
|
|
||||||
m_renderContext = ::wglCreateContextAttribsARB(m_deviceContext, 0, attriblist);
|
|
||||||
|
|
||||||
err:
|
|
||||||
// Dont need the old one anymore.
|
// Dont need the old one anymore.
|
||||||
wglMakeCurrent(m_deviceContext, NULL);
|
wglMakeCurrent(m_deviceContext, NULL);
|
||||||
::wglDeleteContext(tmpDC);
|
::wglDeleteContext(tmpDC);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue