diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index ae66ef8a3d..f6dda04c13 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -613,8 +613,12 @@ static HGLRC createContext(const QOpenGLStaticContext &staticContext, const HGLRC result = staticContext.wglCreateContextAttribsARB(hdc, shared, attributes); - if (!result) - qErrnoWarning("%s: wglCreateContextAttribsARB() failed.", __FUNCTION__); + if (!result) { + QString message; + QDebug(&message).nospace() << __FUNCTION__ << ": wglCreateContextAttribsARB() failed (GL error code: 0x" + << hex << glGetError() << dec << ") for format: " << format << ", shared context: " << shared; + qErrnoWarning("%s", qPrintable(message)); + } return result; } |