My Project
Public Member Functions | Public Attributes | Friends | List of all members
ParaEngine::CTextureLoader Class Reference

CTextureLoader implementation of IDataLoader it will first search locally. More...

#include <ContentLoaderTexture.h>

Inheritance diagram for ParaEngine::CTextureLoader:
ParaEngine::IDataLoader

Public Member Functions

 CTextureLoader (asset_ptr< TextureEntity > &pAsset, const char *sFileName=NULL)
 
HRESULT CleanUp ()
 clean up everything
 
const char * GetFileName ()
 get file name
 
const char * GetKeyName ()
 get key name
 
HRESULT Decompress (void **ppData, int *pcBytes)
 Decompress is called by one of the processing threads to decompress the data. More...
 
HRESULT Destroy ()
 Destroy is called by the graphics thread when it has consumed the data. More...
 
HRESULT Load ()
 Load is called from the IO thread to load data. More...
 
- Public Member Functions inherited from ParaEngine::IDataLoader
virtual void SetEstimatedSizeInBytes (int nSize)
 this function is solely used in statistics reporting. More...
 
virtual int GetEstimatedSizeInBytes ()
 this function is solely used in statistics reporting. More...
 
virtual bool IsDeviceObject ()
 default to true. More...
 

Public Attributes

asset_ptr< TextureEntitym_asset
 the asset file that this texture loader will update to
 
std::string m_sFileName
 
void ** m_ppTexture
 if this is NULL, the m_asset->m_pTexture is sued.
 
D3DFORMAT m_dwTextureFormat
 the format of the texture, default to D3DFMT_UNKNOWN
 
UINT m_nMipLevels
 Mip levels, default to D3DX_DEFAULT.
 
Color m_dwColorKey
 
char * m_pData
 
int m_cBytes
 
CParaFile m_file
 
AssetFileEntrym_pAssetFileEntry
 the loader failed because the asset file the following file needs to be downloaded from the asset web server. More...
 

Friends

struct TextureEntity
 

Detailed Description

CTextureLoader implementation of IDataLoader it will first search locally.

If not found or version expired (as indicated in the assets_manifest file), we will download from the asset update server.

Constructor & Destructor Documentation

§ CTextureLoader()

ParaEngine::CTextureLoader::CTextureLoader ( asset_ptr< TextureEntity > &  pAsset,
const char *  sFileName = NULL 
)
Parameters
sFileNameif this is "", m_asset->GetLocalFileName() is used.

Member Function Documentation

§ Decompress()

HRESULT ParaEngine::CTextureLoader::Decompress ( void **  ppData,
int *  pcBytes 
)
virtual

Decompress is called by one of the processing threads to decompress the data.

Implements ParaEngine::IDataLoader.

§ Destroy()

HRESULT ParaEngine::CTextureLoader::Destroy ( )
virtual

Destroy is called by the graphics thread when it has consumed the data.

Implements ParaEngine::IDataLoader.

§ Load()

HRESULT ParaEngine::CTextureLoader::Load ( )
virtual

Load is called from the IO thread to load data.

Load the texture from the packed file.

Implements ParaEngine::IDataLoader.

Member Data Documentation

§ m_pAssetFileEntry

AssetFileEntry* ParaEngine::CTextureLoader::m_pAssetFileEntry

the loader failed because the asset file the following file needs to be downloaded from the asset web server.


The documentation for this class was generated from the following files: