summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-09 19:56:58 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-09 19:56:58 +0300
commit73e3236e9e3971efa3c5079df079c25bbefa2ba7 (patch)
tree9ea4af1d3b392c7469753fda4e69d5a36543e0a1 /src
parent7dd7d00d8206cdf83c6e517044fe598f3a013020 (diff)
downloadplus-73e3236e9e3971efa3c5079df079c25bbefa2ba7.tar.gz
plus-73e3236e9e3971efa3c5079df079c25bbefa2ba7.tar.bz2
plus-73e3236e9e3971efa3c5079df079c25bbefa2ba7.tar.xz
plus-73e3236e9e3971efa3c5079df079c25bbefa2ba7.zip
Show error message in log if selected texture compression not supported.
Diffstat (limited to 'src')
-rw-r--r--src/graphicsmanager.cpp10
-rw-r--r--src/graphicsmanager.h2
-rw-r--r--src/render/graphics.cpp1
3 files changed, 11 insertions, 2 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 71fdb7ca3..94c34a154 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -650,7 +650,7 @@ bool GraphicsManager::supportExtension(const std::string &ext) const
return mExtensions.find(ext) != mExtensions.end();
}
-void GraphicsManager::updateTextureFormat() const
+void GraphicsManager::updateTextureCompressionFormat() const
{
const int compressionFormat = config.getIntValue("compresstextures");
// using extensions if can
@@ -716,12 +716,18 @@ void GraphicsManager::updateTextureFormat() const
}
}
delete []formats;
+ if (compressionFormat)
+ logger->log1("no correct compression format found");
}
else
{
- logger->log1("no correct compression format found");
+ if (compressionFormat)
+ logger->log1("no correct compression format found");
}
+}
+void GraphicsManager::updateTextureFormat() const
+{
const int renderer = settings.options.renderer;
// using default formats
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index f2c0e6507..1fe682d27 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -98,6 +98,8 @@ class GraphicsManager final
void updateTextureFormat() const;
+ void updateTextureCompressionFormat() const;
+
bool checkGLVersion(const int major, const int minor)
const A_WARN_UNUSED;
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index 463cac8f1..1e2e7884d 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -302,6 +302,7 @@ bool Graphics::setOpenGLMode()
graphicsManager.initOpenGL();
initArrays(graphicsManager.getMaxVertices());
+ graphicsManager.updateTextureCompressionFormat();
graphicsManager.updateTextureFormat();
updateMemoryInfo();