My Project
|
IDataProcessor is an interface that the AsyncLoader class uses to process and copy data into locked resource pointers. More...
#include <IDataLoader.h>
Public Member Functions | |
virtual HRESULT | LockDeviceObject ()=0 |
LockDeviceObject is called from the Graphics thread to lock the device object (D3D9), unless IsDeviceObject() is false. More... | |
virtual HRESULT | UnLockDeviceObject ()=0 |
UnLockDeviceObject is called from the Graphics thread to unlock the device object, or call updatesubresource for D3D10, unless IsDeviceObject() is false. 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 | Process (void *pData, int cBytes)=0 |
Process is called by one of the processing threads to process the data before it is consumed. More... | |
virtual HRESULT | CopyToResource ()=0 |
CopyToResource copies the data from memory to the locked device object (D3D9). More... | |
virtual void | SetResourceError ()=0 |
SetResourceError is called to set the resource pointer to an error code in the event that something went wrong. More... | |
virtual void | SetProcessorWorkerData (IProcessorWorkerData *pThreadLocalData) |
set thread local data. More... | |
virtual IProcessorWorkerData * | GetProcessorWorkerData () |
get thread local data. More... | |
virtual bool | IsDeviceObject () |
default to true. More... | |
IDataProcessor is an interface that the AsyncLoader class uses to process and copy data into locked resource pointers.
Process is called by one of the processing threads to process the data before it is consumed. LockDeviceObject is called from the Graphics thread to lock the device object (D3D9). UnLockDeviceObject is called from the Graphics thread to unlock the device object, or to call updatesubresource for D3D10. CopyToResource copies the data from memory to the locked device object (D3D9). SetResourceError is called to set the resource pointer to an error code in the event that something went wrong. Destroy is called by the graphics thread when it has consumed the data.
|
pure virtual |
CopyToResource copies the data from memory to the locked device object (D3D9).
Also by the IO thread.
Implemented in ParaEngine::CTextureProcessor, ParaEngine::CMeshProcessor, ParaEngine::CUrlProcessor, ParaEngine::CCCSFaceProcessor, ParaEngine::CCCSSkinProcessor, ParaEngine::CParaXProcessor, and ParaEngine::CadModelProcessor.
|
pure virtual |
Destroy is called by the graphics thread when it has consumed the data, unless IsDeviceObject() is false.
Implemented in ParaEngine::CTextureProcessor, ParaEngine::CMeshProcessor, ParaEngine::CUrlProcessor, ParaEngine::CCCSFaceProcessor, ParaEngine::CCCSSkinProcessor, ParaEngine::CParaXProcessor, and ParaEngine::CadModelProcessor.
|
inlinevirtual |
get thread local data.
It may return NULL if the processor does not support thread local data.
Reimplemented in ParaEngine::CUrlProcessor.
|
inlinevirtual |
default to true.
If not true, LockDeviceObject, UnLockDeviceObject are not called and Destroy will be called in the worker thread instead of render thread.
Reimplemented in ParaEngine::CUrlProcessor.
|
pure virtual |
LockDeviceObject is called from the Graphics thread to lock the device object (D3D9), unless IsDeviceObject() is false.
Implemented in ParaEngine::CTextureProcessor, ParaEngine::CMeshProcessor, ParaEngine::CUrlProcessor, ParaEngine::CCCSFaceProcessor, ParaEngine::CCCSSkinProcessor, ParaEngine::CParaXProcessor, and ParaEngine::CadModelProcessor.
|
pure virtual |
Process is called by one of the processing threads to process the data before it is consumed.
Implemented in ParaEngine::CTextureProcessor, ParaEngine::CMeshProcessor, ParaEngine::CUrlProcessor, ParaEngine::CCCSFaceProcessor, ParaEngine::CCCSSkinProcessor, ParaEngine::CParaXProcessor, and ParaEngine::CadModelProcessor.
|
inlinevirtual |
set thread local data.
Reimplemented in ParaEngine::CUrlProcessor.
|
pure virtual |
SetResourceError is called to set the resource pointer to an error code in the event that something went wrong.
Implemented in ParaEngine::CTextureProcessor, ParaEngine::CMeshProcessor, ParaEngine::CUrlProcessor, ParaEngine::CCCSFaceProcessor, ParaEngine::CCCSSkinProcessor, ParaEngine::CParaXProcessor, and ParaEngine::CadModelProcessor.
|
pure virtual |
UnLockDeviceObject is called from the Graphics thread to unlock the device object, or call updatesubresource for D3D10, unless IsDeviceObject() is false.
Implemented in ParaEngine::CTextureProcessor, ParaEngine::CMeshProcessor, ParaEngine::CUrlProcessor, ParaEngine::CCCSFaceProcessor, ParaEngine::CCCSSkinProcessor, ParaEngine::CParaXProcessor, and ParaEngine::CadModelProcessor.