mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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;
|
||||
std::call_once(once, [] {
|
||||
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 Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||
|
||||
qCDebug(gpulogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||
|
||||
glewExperimental = true;
|
||||
GLenum err = glewInit();
|
||||
glGetError();
|
||||
glGetError(); // clear the potential error from glewExperimental
|
||||
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, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
||||
|
|
|
@ -30,7 +30,7 @@ bool OculusBaseDisplayPlugin::isSupported() const {
|
|||
void OculusBaseDisplayPlugin::customizeContext() {
|
||||
glewExperimental = true;
|
||||
GLenum err = glewInit();
|
||||
glGetError();
|
||||
glGetError(); // clear the potential error from glewExperimental
|
||||
Parent::customizeContext();
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void OpenVrDisplayPlugin::customizeContext() {
|
|||
std::call_once(once, []{
|
||||
glewExperimental = true;
|
||||
GLenum err = glewInit();
|
||||
glGetError();
|
||||
glGetError(); // clear the potential error from glewExperimental
|
||||
});
|
||||
Parent::customizeContext();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue