My Project
|
IDataLoader is an interface that the AsyncLoader class uses to load data from disk. More...
#include <IDataLoader.h>
Public Member Functions | |
virtual const char * | GetFileName () |
get the file name | |
virtual const char * | GetKeyName () |
get the key name | |
virtual HRESULT | Decompress (void **ppData, int *pcBytes)=0 |
Decompress is called by one of the processing threads to decompress the data. More... | |
virtual HRESULT | Destroy ()=0 |
Destroy is called by the graphics thread when it has consumed the data, unless IsDeviceObject() is false. More... | |
virtual HRESULT | Load ()=0 |
Load is called from the IO thread to load data. More... | |
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... | |
IDataLoader is an interface that the AsyncLoader class uses to load data from disk.
Load is called from the IO thread to load data. Decompress is called by one of the processing threads to decompress the data. Destroy is called by the graphics thread when it has consumed the data.
|
pure virtual |
Decompress is called by one of the processing threads to decompress the data.
Implemented in ParaEngine::CTextureLoader, ParaEngine::CCCSFaceLoader, ParaEngine::CUrlLoader, ParaEngine::CCCSSkinLoader, ParaEngine::CMeshLoader, ParaEngine::CParaXLoader, and ParaEngine::CadModelLoader.
|
pure virtual |
Destroy is called by the graphics thread when it has consumed the data, unless IsDeviceObject() is false.
Implemented in ParaEngine::CTextureLoader, ParaEngine::CCCSFaceLoader, ParaEngine::CUrlLoader, ParaEngine::CCCSSkinLoader, ParaEngine::CMeshLoader, ParaEngine::CParaXLoader, and ParaEngine::CadModelLoader.
|
inlinevirtual |
this function is solely used in statistics reporting.
Reimplemented in ParaEngine::CUrlLoader.
|
inlinevirtual |
default to true.
If not true, Destroy() will be called in the worker thread instead of render thread.
Reimplemented in ParaEngine::CUrlLoader.
|
pure virtual |
Load is called from the IO thread to load data.
Implemented in ParaEngine::CTextureLoader, ParaEngine::CUrlLoader, ParaEngine::CCCSFaceLoader, ParaEngine::CCCSSkinLoader, ParaEngine::CMeshLoader, ParaEngine::CParaXLoader, and ParaEngine::CadModelLoader.
|
inlinevirtual |
this function is solely used in statistics reporting.
can only be called once immediately after a data loader is constructed.
Reimplemented in ParaEngine::CUrlLoader.