Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

/Users/blackie/Documents/myRepository/phobosengine-vc2005/phobosengine/phobosengine/TextureDatabase.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef TEXTUREDATABASE_H
00004 #define TEXTUREDATABASE_H
00005 
00006 
00007 #include "Renderer.h"
00008 
00009 #include <string>
00010 #include <vector>
00011 
00012 
00013 namespace pge {
00014 
00015 
00016         class Texture;
00017         class TextureResourceFile;
00018 
00019 
00020         class TextureDatabase {
00021 
00022         public:
00023                 //************************************************************************
00024                 //
00025                 // Destructor
00026                 //
00027                 //************************************************************************
00029                 ~TextureDatabase(void);
00030 
00031 
00032                 //************************************************************************
00033                 //
00034                 // Functions
00035                 //
00036                 //************************************************************************
00037                 static TextureDatabase* getInstance(void);
00038                 void destroy(void);
00039 
00040                 Texture* getDefaultTexture(void);
00041 
00042                 Texture* addTexture(const std::string &filename);
00043                 Texture* addTexture(const std::string &filename, const std::string &name, bool mipmap, bool alpha);
00044                 Texture* addTexture(const std::string &filename, const std::string &name, bool mipmap,
00045                         GLuint wrapS, GLuint wrapT, GLuint minFilter, GLuint magFilter, bool alpha,
00046                         int alphaRed, int alphaGreen, int alphaBlue);
00047 
00048                 bool containsTexture(const std::string &name);
00049                 Texture* getTextureByName(const std::string &name);
00050 
00051 
00052         private:
00053                 //************************************************************************
00054                 //
00055                 // Constructor
00056                 //
00057                 //************************************************************************
00059                 TextureDatabase(void);
00060 
00061 
00062                 //************************************************************************
00063                 //
00064                 // Variables
00065                 //
00066                 //************************************************************************
00067                 std::vector<Texture*> m_textureList;
00068 
00069                 TextureResourceFile *m_resFile;
00070                 Texture *m_defaultTexture;
00071         };
00072 };
00073 
00074 #endif

Generated on Mon Oct 16 12:08:11 2006 for Phobosengine by doxygen 1.3.4