mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:58:07 +02:00
Add comment explaining bare glGetError
This commit is contained in:
parent
f57332e4be
commit
64ced6ee04
3 changed files with 4 additions and 7 deletions
|
@ -87,18 +87,15 @@ void GLBackend::init() {
|
||||||
static std::once_flag once;
|
static std::once_flag once;
|
||||||
std::call_once(once, [] {
|
std::call_once(once, [] {
|
||||||
qCDebug(gpulogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
qCDebug(gpulogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||||
|
|
||||||
qCDebug(gpulogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
qCDebug(gpulogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
|
|
||||||
qCDebug(gpulogging) << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
qCDebug(gpulogging) << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||||
|
|
||||||
qCDebug(gpulogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
qCDebug(gpulogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||||
|
|
||||||
glewExperimental = true;
|
glewExperimental = true;
|
||||||
GLenum err = glewInit();
|
GLenum err = glewInit();
|
||||||
glGetError();
|
glGetError(); // clear the potential error from glewExperimental
|
||||||
if (GLEW_OK != err) {
|
if (GLEW_OK != err) {
|
||||||
/* Problem: glewInit failed, something is seriously wrong. */
|
// glewInit failed, something is seriously wrong.
|
||||||
qCDebug(gpulogging, "Error: %s\n", glewGetErrorString(err));
|
qCDebug(gpulogging, "Error: %s\n", glewGetErrorString(err));
|
||||||
}
|
}
|
||||||
qCDebug(gpulogging, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
qCDebug(gpulogging, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
||||||
|
|
|
@ -30,7 +30,7 @@ bool OculusBaseDisplayPlugin::isSupported() const {
|
||||||
void OculusBaseDisplayPlugin::customizeContext() {
|
void OculusBaseDisplayPlugin::customizeContext() {
|
||||||
glewExperimental = true;
|
glewExperimental = true;
|
||||||
GLenum err = glewInit();
|
GLenum err = glewInit();
|
||||||
glGetError();
|
glGetError(); // clear the potential error from glewExperimental
|
||||||
Parent::customizeContext();
|
Parent::customizeContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ void OpenVrDisplayPlugin::customizeContext() {
|
||||||
std::call_once(once, []{
|
std::call_once(once, []{
|
||||||
glewExperimental = true;
|
glewExperimental = true;
|
||||||
GLenum err = glewInit();
|
GLenum err = glewInit();
|
||||||
glGetError();
|
glGetError(); // clear the potential error from glewExperimental
|
||||||
});
|
});
|
||||||
Parent::customizeContext();
|
Parent::customizeContext();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue