NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
BasicTexture.h
Go to the documentation of this file.
00001 
00010 #pragma once
00011 
00012 // Standard Includes
00013 #include <string>
00014 #include <map>
00015 
00016 // Library Includes
00017 #include <d3dx9tex.h>
00018 
00019 // Local Includes
00020 #include "../RenderModule.h"
00021 #include "TextureInterface.h"
00022 
00023 // Forward Declarations
00024 
00025 // Typedefs
00026 namespace GraphicsCore {
00027   typedef std::map<std::string, Texture> TextureCacheMap;
00028   typedef TextureCacheMap::value_type TextureCacheMapValue;
00029 }
00030 
00031 // Class
00032 namespace GraphicsCore {
00033   class BasicTexture : public TextureInterface {
00034   public:
00035     BasicTexture();
00036     BasicTexture(RenderModule*, std::string);
00037     ~BasicTexture();
00038     
00039   private: // Inherited interface function implmentations should be private to help the compiler detect potential issues if the interface changes.
00040     void Apply(LPDIRECT3DDEVICE9);
00041     
00042   private:
00044     void LoadTextureFromFile(RenderModule*, std::string);
00045     
00046   private:
00047     static TextureCacheMap TextureCache;
00048     
00049   private:
00050     Texture texture;
00051     
00052   };
00053 }