aboutsummaryrefslogtreecommitdiff
path: root/src/client/tile.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-03-05 15:10:44 +0100
committersfan5 <sfan5@live.de>2023-04-08 20:19:35 +0200
commit9d736e8b8baeeacad9cfa94edd18adfcaf000029 (patch)
tree6799a199edaeb82481edea6f101dc744b4507e9f /src/client/tile.cpp
parentc26e122485a7180edf434c0c1211713ff377d6d7 (diff)
downloadminetest-9d736e8b8baeeacad9cfa94edd18adfcaf000029.tar.xz
Drop ENABLE_GLES option
ENABLE_GLES predates forking Irrlicht. Its primary use was to distinguish Irrlicht-ogles from upstream version as Minetest could be compiled with either. That's not necessary anymore and gets in the way sometimes.
Diffstat (limited to 'src/client/tile.cpp')
-rw-r--r--src/client/tile.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/client/tile.cpp b/src/client/tile.cpp
index 14fc316e7..8421465c4 100644
--- a/src/client/tile.cpp
+++ b/src/client/tile.cpp
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <algorithm>
#include <ICameraSceneNode.h>
+#include <IVideoDriver.h>
#include "util/string.h"
#include "util/container.h"
#include "util/thread.h"
@@ -617,9 +618,7 @@ u32 TextureSource::generateTexture(const std::string &name)
video::ITexture *tex = NULL;
if (img != NULL) {
-#if ENABLE_GLES
img = Align2Npot2(img, driver);
-#endif
// Create texture from resulting image
tex = driver->addTexture(name.c_str(), img);
guiScalingCache(io::path(name.c_str()), driver, img);
@@ -819,9 +818,7 @@ void TextureSource::rebuildTexture(video::IVideoDriver *driver, TextureInfo &ti)
// shouldn't really need to be done, but can't hurt
std::set<std::string> source_image_names;
video::IImage *img = generateImage(ti.name, source_image_names);
-#if ENABLE_GLES
img = Align2Npot2(img, driver);
-#endif
// Create texture from resulting image
video::ITexture *t = NULL;
if (img) {
@@ -1055,8 +1052,6 @@ video::IImage* TextureSource::generateImage(const std::string &name, std::set<st
return baseimg;
}
-#if ENABLE_GLES
-
/**
* Check and align image to npot2 if required by hardware
* @param image image to check for npot2 alignment
@@ -1094,8 +1089,6 @@ video::IImage *Align2Npot2(video::IImage *image,
return targetimage;
}
-#endif
-
static std::string unescape_string(const std::string &str, const char esc = '\\')
{
std::string out;