diff options
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 655040aab..a63bfd254 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -769,15 +769,17 @@ void GraphicsManager::initOpenGL() void GraphicsManager::createTextureSampler() { + GLenum err = getLastError(); + if (err) + logger->log(errorToString(err)); if (mUseTextureSampler) { - logger->log("using texture sampler"); - getLastError(); + logger->log1("using texture sampler"); mglGenSamplers(1, &mTextureSampler); if (getLastError() != GL_NO_ERROR) { mUseTextureSampler = false; - logger->log("texture sampler error"); + logger->log1("texture sampler error"); OpenGLImageHelper::setUseTextureSampler(mUseTextureSampler); return; } @@ -786,13 +788,13 @@ void GraphicsManager::createTextureSampler() if (getLastError() != GL_NO_ERROR) { mUseTextureSampler = false; - logger->log("texture sampler error"); + logger->log1("texture sampler error"); } } OpenGLImageHelper::setUseTextureSampler(mUseTextureSampler); } -unsigned int GraphicsManager::getLastError() +GLenum GraphicsManager::getLastError() { GLenum tmp = glGetError(); GLenum error = GL_NO_ERROR; |