X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Ftexture_manager.hpp;h=1431c68ea6565154c74a3b3c61cf99ea7598e632;hb=86e5914510fc29f4decbb66a7d602872b6c8555e;hp=32280f4317b1006c196592400ccf1a9d3afabc9f;hpb=07ddaed2a657e4d2a3d038fed223fc5827159caf;p=supertux.git diff --git a/src/video/texture_manager.hpp b/src/video/texture_manager.hpp index 32280f431..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,33 +37,36 @@ public: TextureManager(); ~TextureManager(); - ImageTexture* get(const std::string& filename); - - void register_texture(Texture* texture); - void remove_texture(Texture* texture); + Texture* get(const std::string& filename); + +#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); - - typedef std::map ImageTextures; + friend class Texture; + void release(Texture* texture); + + 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; - GLint border; + GLint border; GLint min_filter; GLint mag_filter; @@ -70,10 +75,10 @@ private: }; std::vector saved_textures; - void save_texture(Texture* texture); + void save_texture(GL::Texture* texture); +#endif }; extern TextureManager* texture_manager; #endif -