ScummVM API documentation
hpl::iTexture Class Referenceabstract
Inheritance diagram for hpl::iTexture:
hpl::LowLevelPicture hpl::iResourceBase

Public Member Functions

 iTexture (tString asName, tString asType, Graphics::PixelFormat *apPxlFmt, iLowLevelGraphics *apLowLevelGraphics, eTextureType aType, bool abUseMipMaps, eTextureTarget aTarget, bool abCompress=false)
 
void SetSizeLevel (unsigned int alLevel)
 
void SetMinLevelSize (const cVector2l &avSize)
 
bool reload () override
 
void unload () override
 
void destroy () override
 
virtual bool CreateFromBitmap (Bitmap2D *pBmp)=0
 
virtual bool CreateCubeFromBitmapVec (tBitmap2DVec *avBitmaps)=0
 
virtual bool Create (unsigned int alWidth, unsigned int alHeight, cColor aCol)=0
 
virtual bool CreateAnimFromBitmapVec (tBitmap2DVec *avBitmaps)=0
 
virtual bool CreateFromArray (unsigned char *apPixelData, int alChannels, const cVector3l &avSize)=0
 
virtual void Update (float afTimeStep)=0
 
virtual void SetPixels2D (int alLevel, const cVector2l &avOffset, const cVector2l &avSize, eColorDataFormat aDataFormat, void *apPixelData)=0
 
virtual void SetFilter (eTextureFilter aFilter)=0
 
virtual void SetAnisotropyDegree (float afX)=0
 
eTextureFilter GetFilter ()
 
float GetAnisotropyDegree (float afX)
 
virtual float GetGamma ()=0
 
virtual void SetGamma (float afGamma)=0
 
virtual int GetHandle ()=0
 
virtual bool hasAlpha () override
 
uint32 getBpp () const override
 
virtual void SetWrapS (eTextureWrap aMode)=0
 
virtual void SetWrapT (eTextureWrap aMode)=0
 
virtual void SetWrapR (eTextureWrap aMode)=0
 
eTextureWrap GetWrapS ()
 
eTextureWrap GetWrapT ()
 
eTextureWrap GetWrapR ()
 
void SetFrameTime (float afX)
 
float GetFrameTime ()
 
eTextureAnimMode GetAnimMode ()
 
void SetAnimMode (eTextureAnimMode aMode)
 
eTextureType GetTextureType ()
 
bool UsesMipMaps ()
 
void SetMipMapUse (bool abX)
 
eTextureTarget GetTarget ()
 
virtual bool HasAnimation ()=0
 
virtual void NextFrame ()=0
 
virtual void PrevFrame ()=0
 
virtual float GetT ()=0
 
virtual float GetTimeCount ()=0
 
virtual void SetTimeCount (float afX)=0
 
virtual int GetCurrentLowlevelHandle ()=0
 
- Public Member Functions inherited from hpl::LowLevelPicture
 LowLevelPicture (const tString &type)
 
tString getType ()
 
uint32 getHeight () const
 
uint32 getWidth () const
 
void setPath (const tString &path)
 
tString getPath ()
 
tString getFileName () const
 
- Public Member Functions inherited from hpl::iResourceBase
 iResourceBase (tString asName, unsigned long alPrio)
 
tString GetName ()
 
unsigned long GetHandle ()
 
void SetHandle (unsigned long alHandle)
 
tString GetFilePath ()
 
unsigned long GetTime ()
 
unsigned long GetPrio ()
 
unsigned long GetSize ()
 
void SetLogDestruction (bool abX)
 
unsigned int GetUserCount ()
 
void IncUserCount ()
 
void DecUserCount ()
 
bool HasUsers ()
 

Protected Attributes

eTextureType mType
 
eTextureTarget mTarget
 
eTextureWrap mWrapS
 
eTextureWrap mWrapT
 
eTextureWrap mWrapR
 
eTextureFilter mFilter
 
float mfAnisotropyDegree
 
bool mbUseMipMaps
 
bool mbCompress
 
iLowLevelGraphicsmpLowLevelGraphics
 
float mfFrameTime
 
eTextureAnimMode mAnimMode
 
unsigned int mlSizeLevel
 
uint32 _bpp
 
cVector2l mvMinLevelSize
 
- Protected Attributes inherited from hpl::LowLevelPicture
uint32 _height
 
uint32 _width
 
- Protected Attributes inherited from hpl::iResourceBase
unsigned int mlPrio
 
unsigned long mlTime
 
unsigned long mlSize
 
unsigned int mlUserCount
 
unsigned long mlHandle
 
tString msName
 
tString msFilePath
 
bool mbLogDestruction
 

Additional Inherited Members

- Static Public Member Functions inherited from hpl::iResourceBase
static bool GetLogCreateAndDelete ()
 
static void SetLogCreateAndDelete (bool abX)
 
- Static Protected Attributes inherited from hpl::iResourceBase
static bool mbLogCreateAndDelete
 

Member Function Documentation

◆ reload()

bool hpl::iTexture::reload ( )
inlineoverridevirtual

virtual bool Reload()=0;

Returns
true is reload was succesful, else false.

Implements hpl::iResourceBase.

◆ unload()

void hpl::iTexture::unload ( )
inlineoverridevirtual

Free most the memory, save info to get started again.

Implements hpl::iResourceBase.

◆ destroy()

void hpl::iTexture::destroy ( )
inlineoverridevirtual

Free all memory.

Implements hpl::iResourceBase.

◆ CreateFromBitmap()

virtual bool hpl::iTexture::CreateFromBitmap ( Bitmap2D pBmp)
pure virtual

Create a texture from a bitmap, work only for 1D, 2D and Rect targets. Doesn't work with render targets.

Parameters
pBmp
Returns

◆ CreateCubeFromBitmapVec()

virtual bool hpl::iTexture::CreateCubeFromBitmapVec ( tBitmap2DVec avBitmaps)
pure virtual

Create a cube map texture from a vector of bitmaps. Doesn't work with render targets. All bitmaps most be square, a power of 2 and the same same. The order must be: posX, negX, posY, negY, posZ and negZ.

Parameters
*avBitmapsa vector with at least 6 bitmaps
Returns

◆ Create()

virtual bool hpl::iTexture::Create ( unsigned int  alWidth,
unsigned int  alHeight,
cColor  aCol 
)
pure virtual

Create a texture with color, works with all target types. Works with render targets.

Parameters
alWidth
alHeight
aCol
Returns

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