#ifndef __C_SOFTWARE_TEXTURE_H_INCLUDED__
#define __C_SOFTWARE_TEXTURE_H_INCLUDED__
#include "ITexture.h"
#include "CImage.h"
namespace irr
{
namespace video
{
class CSoftwareTexture : public ITexture
{
public:
CSoftwareTexture(IImage* surface, const io::path& name,
bool renderTarget=false, void* mipmapData=0);
virtual ~CSoftwareTexture();
virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0);
virtual void unlock();
virtual const core::dimension2d<u32>& getOriginalSize() const;
virtual const core::dimension2d<u32>& getSize() const;
virtual CImage* getImage();
virtual CImage* getTexture();
virtual E_DRIVER_TYPE getDriverType() const;
virtual ECOLOR_FORMAT getColorFormat() const;
virtual u32 getPitch() const;
virtual void regenerateMipMapLevels(void* mipmapData=0);
virtual bool isRenderTarget() const;
private:
CImage* Image;
CImage* Texture;
core::dimension2d<u32> OrigSize;
bool IsRenderTarget;
};
}
}
#endif