summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-25 16:56:52 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-25 16:56:52 +0000
commit14c82e5b5d5547bcf9c3b06c68cf20a100600d0b (patch)
treea46770e8dc29a541eff9480c0e5c132336666b48 /src/resources/image.h
parent06ea0c8cf1986460d3c74cddd02a714fb6c26bca (diff)
downloadmana-client-14c82e5b5d5547bcf9c3b06c68cf20a100600d0b.tar.gz
mana-client-14c82e5b5d5547bcf9c3b06c68cf20a100600d0b.tar.bz2
mana-client-14c82e5b5d5547bcf9c3b06c68cf20a100600d0b.tar.xz
mana-client-14c82e5b5d5547bcf9c3b06c68cf20a100600d0b.zip
Removed dependency on Guichan's OpenGL library. Taken over image loading and handling. Reduced memory usage when using OpenGL. (Up to 95% reduction for some textures.)
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index cad21dcd..34515dda 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -71,6 +71,11 @@ class Image : public Resource
load(void* buffer, unsigned int bufferSize, const std::string &idPath);
/**
+ * Loads an image from an SDL surface.
+ */
+ static Image *load(SDL_Surface *, std::string const &idPath);
+
+ /**
* Frees the resources created by SDL.
*/
virtual void
@@ -143,6 +148,8 @@ class Image : public Resource
int mTexWidth, mTexHeight;
static bool mUseOpenGL;
+ static int mTextureType;
+ static int mTextureSize;
#endif
SDL_Surface *mImage;
float mAlpha;