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

CTextureProcessor implementation of IDataProcessor. More...

#include <ContentLoaderTexture.h>

Inheritance diagram for ParaEngine::CTextureProcessor:
ParaEngine::IDataProcessor

Public Member Functions

 CTextureProcessor (asset_ptr< TextureEntity > &pAsset)
 
RenderDevicePtr GetRenderDevice ()
 Get render device.
 
HRESULT CleanUp ()
 clean up everything
 
HRESULT LockDeviceObject ()
 LockDeviceObject is called from the Graphics thread to lock the device object (D3D9), unless IsDeviceObject() is false. More...
 
HRESULT UnLockDeviceObject ()
 UnLockDeviceObject is called from the Graphics thread to unlock the device object, or call updatesubresource for D3D10, unless IsDeviceObject() is false. More...
 
HRESULT Destroy ()
 Destroy is called by the graphics thread when it has consumed the data, unless IsDeviceObject() is false. More...
 
HRESULT Process (void *pData, int cBytes)
 Process is called by one of the processing threads to process the data before it is consumed. More...
 
HRESULT CopyToResource ()
 CopyToResource copies the data from memory to the locked device object (D3D9). More...
 
void SetResourceError ()
 SetResourceError is called to set the resource pointer to an error code in the event that something went wrong. More...
 
- Public Member Functions inherited from ParaEngine::IDataProcessor
virtual void SetProcessorWorkerData (IProcessorWorkerData *pThreadLocalData)
 set thread local data. More...
 
virtual IProcessorWorkerDataGetProcessorWorkerData ()
 get thread local data. More...
 
virtual bool IsDeviceObject ()
 default to true. More...
 

Public Attributes

asset_ptr< TextureEntitym_asset
 the asset file that this texture loader will update to
 
RenderDevicePtr m_pDevice
 if this is NULL, the default device is used.
 
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
 

Friends

struct TextureEntity
 

Detailed Description

CTextureProcessor implementation of IDataProcessor.

Member Function Documentation

§ CopyToResource()

HRESULT ParaEngine::CTextureProcessor::CopyToResource ( )
virtual

CopyToResource copies the data from memory to the locked device object (D3D9).

Also by the IO thread.

Implements ParaEngine::IDataProcessor.

§ Destroy()

HRESULT ParaEngine::CTextureProcessor::Destroy ( )
virtual

Destroy is called by the graphics thread when it has consumed the data, unless IsDeviceObject() is false.

Implements ParaEngine::IDataProcessor.

§ LockDeviceObject()

HRESULT ParaEngine::CTextureProcessor::LockDeviceObject ( )
virtual

LockDeviceObject is called from the Graphics thread to lock the device object (D3D9), unless IsDeviceObject() is false.

Implements ParaEngine::IDataProcessor.

§ Process()

HRESULT ParaEngine::CTextureProcessor::Process ( void *  pData,
int  cBytes 
)
virtual

Process is called by one of the processing threads to process the data before it is consumed.

Implements ParaEngine::IDataProcessor.

§ SetResourceError()

void ParaEngine::CTextureProcessor::SetResourceError ( )
virtual

SetResourceError is called to set the resource pointer to an error code in the event that something went wrong.

Implements ParaEngine::IDataProcessor.

§ UnLockDeviceObject()

HRESULT ParaEngine::CTextureProcessor::UnLockDeviceObject ( )
virtual

UnLockDeviceObject is called from the Graphics thread to unlock the device object, or call updatesubresource for D3D10, unless IsDeviceObject() is false.

Implements ParaEngine::IDataProcessor.


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