Main Page   Class Hierarchy   Compound List   File List   Compound Members  

awstex.h

00001 #ifndef __AWS_TEXTURE_MANAGER__
00002 #define __AWS_TEXTURE_MANAGER__
00003 
00004 #include "csutil/csvector.h"
00005 
00006 struct iString;
00007 struct iObjectRegistry;
00008 struct iReporter;
00009 struct iTextureHandle;
00010 struct iImageIO;
00011 struct iVFS;
00012 struct iImage;
00013 
00022 class awsTextureManager
00023 {
00024   
00026   iImageIO *loader;
00027 
00029   iTextureManager *txtmgr;
00030 
00032   iVFS *vfs;
00033 
00035   iObjectRegistry *object_reg;
00036 
00038   csBasicVector textures;
00039 
00040   struct awsTexture
00041   {
00042     ~awsTexture ();
00043     iImage         *img;
00044     iTextureHandle *tex;
00045     unsigned long   id;
00046   };
00047 
00048 private:
00050   void RegisterTextures();
00051 
00053   void UnregisterTextures();
00054   
00055 public:
00056 
00058   awsTextureManager();
00059 
00061   ~awsTextureManager();
00062 
00063   
00065   void Initialize(iObjectRegistry* object_reg);
00066 
00070   iTextureHandle *GetTexture(char *name, char *filename=NULL, bool replace=false);
00071 
00076   iTextureHandle *GetTexturebyID(unsigned long id, char *filename=NULL, bool replace=false);
00077 
00080   void SetTextureManager(iTextureManager *txtmgr);
00081 
00083   iTextureManager *GetTextureManager() { return txtmgr; }
00084   
00085 };
00086 
00087 
00088 #endif
00089 

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000