summaryrefslogtreecommitdiff
path: root/src/resources/dye
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-21 20:30:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-21 20:31:41 +0300
commitf37470c61e9913ff7ace2595de604c85f42b0e10 (patch)
tree472f4da4f56b55283618f6d29c8491165738c685 /src/resources/dye
parentbf9006d08721d0faa3bbca73d37224c67a317f48 (diff)
downloadmanaverse-f37470c61e9913ff7ace2595de604c85f42b0e10.tar.gz
manaverse-f37470c61e9913ff7ace2595de604c85f42b0e10.tar.bz2
manaverse-f37470c61e9913ff7ace2595de604c85f42b0e10.tar.xz
manaverse-f37470c61e9913ff7ace2595de604c85f42b0e10.zip
Dont build OpenGL dye functions if OpenGL disabled.
Diffstat (limited to 'src/resources/dye')
-rw-r--r--src/resources/dye/dyepalette.h2
-rw-r--r--src/resources/dye/dyepalette_replacesoglcolor.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h
index 07085e7b6..4cbfa3efc 100644
--- a/src/resources/dye/dyepalette.h
+++ b/src/resources/dye/dyepalette.h
@@ -115,6 +115,7 @@ class DyePalette final
const int bufSize) const restrict2;
#endif // SIMD_SUPPORTED
+#ifdef USE_OPENGL
/**
* replace colors for OpenGL for S dye.
*/
@@ -170,6 +171,7 @@ class DyePalette final
void replaceAOGLColorSimd(uint32_t *restrict pixels,
const int bufSize) const restrict2;
#endif // SIMD_SUPPORTED
+#endif // USE_OPENGL
static unsigned int hexDecode(const signed char c)
noexcept2 A_CONST A_WARN_UNUSED;
diff --git a/src/resources/dye/dyepalette_replacesoglcolor.cpp b/src/resources/dye/dyepalette_replacesoglcolor.cpp
index de768efe3..a023d8f79 100644
--- a/src/resources/dye/dyepalette_replacesoglcolor.cpp
+++ b/src/resources/dye/dyepalette_replacesoglcolor.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef USE_OPENGL
+
#include "resources/dye/dyepalette.h"
#include "logger.h"
@@ -213,3 +215,5 @@ void DyePalette::replaceSOGLColorSimd(uint32_t *restrict pixels,
{
replaceSOGLColorDefault(pixels, bufSize);
}
+
+#endif // USE_OPENGL