My Project
D:/source/c++/Programme/sally/sally/sallyAPI/Texture.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #pragma once
00029 #include "Define.h"
00030 #include <d3dx9.h>
00031 #include "Game.h"
00032 
00033 namespace SallyAPI
00034 {
00035         namespace Core
00036         {
00045 
00046                 class DLL_API_SALLY CTexture
00047                 {
00048                 private:
00049                         std::string                             m_strFileName;
00050                         int                                             m_iId;
00051                         int                                             m_iWidth;
00052                         int                                             m_iHeight;
00053                         LPDIRECT3DTEXTURE9              m_Texture;
00054 
00055                         void    CleanUp();
00056                 public:
00057                         CTexture();
00058                         virtual ~CTexture();
00059 
00060                         bool    LoadTexture(const std::string& fileName, int id, bool createMipMaps = false);
00061                         bool    CreateEmpty(int iWidth, int iHeight, int id, D3DFORMAT d3dFormat);
00062                         bool    CreateEmptyRenderTarget(int iWidth, int iHeight, int id, D3DFORMAT d3dFormat);
00063 
00064                         std::string                     GetFileName();
00065                         LPDIRECT3DTEXTURE9      GetTexture();
00066                         int                                     GetWidth();
00067                         int                                     GetHeight();
00068                         int                                     GetId();
00069                         void                            SetTexture(LPDIRECT3DTEXTURE9           m_Texture);
00070                 };
00071         }
00072 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines