summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-30 01:19:46 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-30 13:11:34 +0300
commit6b1684d33dec02eb6308bb3d8d3707f4d5252ba5 (patch)
tree4a0a5fd220828b92ef96446fe38dbe67ff446c6c /src/graphicsmanager.cpp
parent2a70a50c785ce639b76141a3a6887836d22fe12c (diff)
downloadplus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.gz
plus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.bz2
plus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.xz
plus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.zip
Add unused warnings to some files.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp12
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;