summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-27 21:55:20 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-27 21:55:20 +0000
commitd15d76976b6e57a9f421ab034c6f841051b962f3 (patch)
treeab0c37c90af9f76158b96f195c05be9b221e9f42 /src/resources/image.h
parentaa362286c725e17ec88aa46f8f6af9ca90d744b3 (diff)
downloadMana-d15d76976b6e57a9f421ab034c6f841051b962f3.tar.gz
Mana-d15d76976b6e57a9f421ab034c6f841051b962f3.tar.bz2
Mana-d15d76976b6e57a9f421ab034c6f841051b962f3.tar.xz
Mana-d15d76976b6e57a9f421ab034c6f841051b962f3.zip
Committing merging opengl and sdl part 3 by Andrej
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index cfa42330..a12572bb 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -26,8 +26,9 @@
#include "resource.h"
#include <SDL.h>
+#ifdef USE_OPENGL
#include <SDL_opengl.h>
-
+#endif
/**
* Defines a class for loading and storing images.
@@ -118,21 +119,19 @@ class Image : public Resource
/**
* Constructor.
*/
-//#ifdef USE_OPENGL
+#ifdef USE_OPENGL
Image(GLuint glimage, int width, int height, int texWidth, int texHeight);
-//#else
+#endif
Image(SDL_Surface *image);
-//#endif
bool loaded;
-//#ifdef USE_OPENGL
+#ifdef USE_OPENGL
GLuint glimage;
int width, height;
int texWidth, texHeight;
-//#else
+#endif
SDL_Surface *image;
-//#endif
float alpha;
};
@@ -145,13 +144,12 @@ class SubImage : public Image
/**
* Constructor.
*/
-//#ifndef USE_OPENGL
SubImage(Image *parent, SDL_Surface *image,
int x, int y, int width, int height);
-//#else
+#ifdef USE_OPENGL
SubImage(Image *parent, GLuint image, int x, int y,
int width, int height, int texWidth, int textHeight);
-//#endif
+#endif
/**
* Destructor.