X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Ftexture_manager.hpp;h=1431c68ea6565154c74a3b3c61cf99ea7598e632;hb=e7a12ed844f040d270e50ce25f74de5f017c1157;hp=ee75655ed2c8144f0d583ea990c70ab8014fe843;hpb=a113d3bd1feddd510e3b2852b0d42522735eee40;p=supertux.git diff --git a/src/video/texture_manager.hpp b/src/video/texture_manager.hpp index ee75655ed..1431c68ea 100644 --- a/src/video/texture_manager.hpp +++ b/src/video/texture_manager.hpp @@ -20,14 +20,16 @@ #ifndef __IMAGE_TEXTURE_MANAGER_HPP__ #define __IMAGE_TEXTURE_MANAGER_HPP__ -#include +#include + +#include "glutil.hpp" #include #include #include #include class Texture; -class ImageTexture; +namespace GL { class Texture; } class TextureManager { @@ -35,29 +37,32 @@ public: TextureManager(); ~TextureManager(); - ImageTexture* get(const std::string& filename); + Texture* get(const std::string& filename); - void register_texture(Texture* texture); - void remove_texture(Texture* texture); +#ifdef HAVE_OPENGL + void register_texture(GL::Texture* texture); + void remove_texture(GL::Texture* texture); void save_textures(); void reload_textures(); +#endif private: - friend class ImageTexture; - void release(ImageTexture* texture); + friend class Texture; + void release(Texture* texture); - typedef std::map ImageTextures; + typedef std::map ImageTextures; ImageTextures image_textures; - ImageTexture* create_image_texture(const std::string& filename); + Texture* create_image_texture(const std::string& filename); - typedef std::set Textures; +#ifdef HAVE_OPENGL + typedef std::set Textures; Textures textures; struct SavedTexture { - Texture* texture; + GL::Texture* texture; GLint width; GLint height; char* pixels; @@ -70,7 +75,8 @@ private: }; std::vector saved_textures; - void save_texture(Texture* texture); + void save_texture(GL::Texture* texture); +#endif }; extern TextureManager* texture_manager;