diff options
Diffstat (limited to 'src/client/image.h')
| -rw-r--r-- | src/client/image.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/client/image.h b/src/client/image.h index 015c0d2..03e952d 100644 --- a/src/client/image.h +++ b/src/client/image.h @@ -3,7 +3,7 @@ # define IMAGE_H -//#include "image.h" +# include "main.h" # include "interface.h" # define IMAGE_NO_ALPHA 0 @@ -14,6 +14,10 @@ # define IMAGE_GROUP_USER "user" # define IMAGE_GROUP_OTHER "other" +#ifdef SUPPORT_OPENGL +#include <SDL_opengl.h> +#endif + /* typedef struct image_struct { @@ -23,14 +27,29 @@ typedef struct image_struct } image_data_t; */ +#ifndef SUPPORT_OPENGL typedef struct image_struct { int w; int h; SDL_Surface *image; } image_t; +#endif + +#ifdef SUPPORT_OPENGL +typedef struct image_struct +{ + int w; // width of actual picture + int h; // height of actual picture + GLuint tw; // width of allocated texture + GLuint th; // height of allocated texture + GLuint tex_id; // texture id +} image_t; +#endif extern bool_t isImageInicialized(); extern void initImageData(); +extern image_t* newImage(SDL_Surface *surface); +extern void destroyImage(image_t * p); extern image_t *addImageData(char *file, int alpha, char *name, char *group); extern image_t *getImage(char *group, char *name); extern void delImage(char *group, char *name); |