summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/openglimagehelper.h4
-rw-r--r--src/resources/resourcemanager.cpp2
-rw-r--r--src/resources/resourcemanager.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/openglimagehelper.h b/src/resources/openglimagehelper.h
index e1a6d48cc..e5c0cab5e 100644
--- a/src/resources/openglimagehelper.h
+++ b/src/resources/openglimagehelper.h
@@ -26,16 +26,15 @@
#include "localconsts.h"
#include "main.h"
+#ifdef USE_OPENGL
#include "utils/stringvector.h"
#include "resources/imagehelper.h"
#include <SDL.h>
-#ifdef USE_OPENGL
#define GL_GLEXT_PROTOTYPES 1
#include <SDL_opengl.h>
-#endif
class Dye;
class Image;
@@ -125,3 +124,4 @@ class OpenGLImageHelper final : public ImageHelper
};
#endif
+#endif
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index f67bbf71b..3c5e35738 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -720,6 +720,7 @@ Image *ResourceManager::getSubImage(Image *const parent,
return static_cast<Image*>(get(ss.str(), SubImageLoader::load, &rl));
}
+#ifdef USE_OPENGL
struct AtlasLoader
{
const std::string name;
@@ -745,6 +746,7 @@ Resource *ResourceManager::getAtlas(const std::string &name,
return get("atlas_" + name, AtlasLoader::load, &rl);
}
+#endif
struct SpriteDefLoader
{
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 6f8b386f0..80461ce19 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -212,7 +212,9 @@ class ResourceManager final
Image *getSubImage(Image *const parent, const int x, const int y,
const int width, const int height);
+#ifdef USE_OPENGL
Resource *getAtlas(const std::string &name, const StringVect &files);
+#endif
/**
* Creates a sprite definition based on a given path and the supplied