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>
This commit is contained in:
parent
02311c07cf
commit
de098e21d1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user