diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-05-22 16:22:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-23 12:49:39 +0200 |
commit | de098e21d1f0c533fcace11368d5c76217eb0f56 (patch) | |
tree | 395fc81069b9c31ea25b06b378bd511edc1ebd49 /src/plugins | |
parent | 02311c07cf98d5a39a05a81aac5d5fc318f2d822 (diff) |
Improve error message in GL context creation.
Output format, glGetError(), shared context as well.
Task-number: QTBUG-30077
Change-Id: Ibc4a7f9ad99bdcdcb439e719394d2532445c3fbe
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins')
-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; } |