ScummVM API documentation
hpl::iMaterial Class Referenceabstract
Inheritance diagram for hpl::iMaterial:
hpl::iResourceBase hpl::cMaterial_Additive hpl::cMaterial_Alpha hpl::cMaterial_BumpSpec2D hpl::cMaterial_Diffuse2D hpl::cMaterial_DiffuseAdditive2D hpl::cMaterial_DiffuseAlpha2D hpl::cMaterial_EnvMap_Reflect hpl::cMaterial_Flat hpl::cMaterial_FontNormal hpl::cMaterial_Modulative hpl::cMaterial_ModulativeX2 hpl::cMaterial_Smoke2D hpl::cMaterial_Water hpl::iMaterial_BaseLight hpl::iMaterial_Fallback01_BaseLight hpl::iMaterial_Fallback02_BaseLight

Public Member Functions

 iMaterial (const tString &asName, iLowLevelGraphics *apLowLevelGraphics, cImageManager *apImageManager, cTextureManager *apTextureManager, cRenderer2D *apRenderer, cGpuProgramManager *apProgramManager, eMaterialPicture aPicture, cRenderer3D *apRenderer3D)
 
bool reload ()
 
void unload ()
 
void destroy ()
 
virtual void Compile ()=0
 
virtual void Update (float afTimeStep)
 
virtual iGpuProgramgetGpuProgram (const eMaterialRenderType aType, const int alPass, iLight3D *apLight)
 
virtual iMaterialProgramSetupgetGpuProgramSetup (const eMaterialRenderType aType, const int alPass, iLight3D *apLight)
 
virtual iGpuProgramGetVertexProgram (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual bool VertexProgramUsesLight (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual bool VertexProgramUsesEye (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual iMaterialProgramSetupGetVertexProgramSetup (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual iGpuProgramGetFragmentProgram (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual iMaterialProgramSetupGetFragmentProgramSetup (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual eMaterialAlphaMode GetAlphaMode (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual eMaterialBlendMode GetBlendMode (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual eMaterialChannelMode GetChannelMode (eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual iTextureGetTexture (int alUnit, eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual eMaterialBlendMode GetTextureBlend (int alUnit, eMaterialRenderType aType, int alPass, iLight3D *apLight)
 
virtual int GetNumOfPasses (eMaterialRenderType aType, iLight3D *apLight)
 
virtual bool UsesType (eMaterialRenderType aType)
 
bool HasAlpha ()
 
void SetHasAlpha (bool abX)
 
bool GetDepthTest ()
 
void SetDepthTest (bool abX)
 
float GetValue ()
 
void SetValue (float afX)
 
virtual bool LoadData (TiXmlElement *apRootElem)
 
virtual bool StartRendering (eMaterialRenderType aType, iCamera *apCam, iLight *pLight)=0
 
virtual void EndRendering (eMaterialRenderType mType)=0
 
virtual tVtxBatchFlag GetBatchFlags (eMaterialRenderType mType)=0
 
virtual bool NextPass (eMaterialRenderType mType)=0
 
virtual bool HasMultiplePasses (eMaterialRenderType mType)=0
 
virtual eMaterialType GetType (eMaterialRenderType mType)=0
 
virtual void EditVertexes (eMaterialRenderType mType, iCamera *apCam, iLight *pLight, tVertexVec *apVtxVec, cVector3f *apTransform, unsigned int alIndexAdd)=0
 
iTextureGetTexture (eMaterialTexture aType)
 
cRect2f GetTextureOffset (eMaterialTexture aType)
 
void SetTexture (iTexture *apTex, eMaterialTexture aType)
 
void SetImage (cResourceImage *apImg, eMaterialTexture aType)
 
cResourceImageGetImage (eMaterialTexture aType)
 
void SetProgram (iGpuProgram *apProgram, eGpuProgramType aType, unsigned int alNum)
 
iGpuProgramGetProgram (eGpuProgramType aType, unsigned int alNum)
 
virtual bool IsTransperant ()
 
virtual bool IsGlowing ()
 
virtual bool UsesLights ()
 
virtual tTextureTypeList GetTextureTypes ()
 
void SetId (int alId)
 
int GetId ()
 
virtual iGpuProgramgetRefractionProgram ()
 
virtual bool GetRefractionUsesDiffuse ()
 
virtual eMaterialTexture GetRefractionDiffuseTexture ()
 
virtual bool GetRefractionUsesEye ()
 
virtual bool GetRefractionUsesTime ()
 
virtual bool GetRefractionSkipsStandardTrans ()
 
const tStringGetPhysicsMaterial ()
 
void SetPhysicsMaterial (const tString &asName)
 
- 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 ()
 

Static Public Member Functions

static void SetQuality (eMaterialQuality aQuality)
 
static eMaterialQuality GetQuality ()
 
- Static Public Member Functions inherited from hpl::iResourceBase
static bool GetLogCreateAndDelete ()
 
static void SetLogCreateAndDelete (bool abX)
 

Protected Attributes

iLowLevelGraphicsmpLowLevelGraphics
 
cImageManagermpImageManager
 
cTextureManagermpTextureManager
 
cRenderer2DmpRenderer
 
cRenderer3DmpRenderer3D
 
cRenderSettingsmpRenderSettings
 
cGpuProgramManagermpProgramManager
 
bool mbIsTransperant
 
bool mbIsGlowing
 
bool mbUsesLights
 
bool mbHasAlpha
 
bool mbDepthTest
 
float mfValue
 
int mlId
 
tString msPhysicsMaterial
 
tTextureVec mvTexture
 
tResourceImageVec mvImage
 
eMaterialType mType
 
eMaterialPicture mPicture
 
iGpuProgrammpProgram [2][(5)]
 
int mlPassCount
 
- 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
 

Static Protected Attributes

static eMaterialQuality mQuality
 
- Static Protected Attributes inherited from hpl::iResourceBase
static bool mbLogCreateAndDelete
 

Member Function Documentation

◆ reload()

bool hpl::iMaterial::reload ( )
inlinevirtual

virtual bool Reload()=0;

Returns
true is reload was succesful, else false.

Implements hpl::iResourceBase.

◆ unload()

void hpl::iMaterial::unload ( )
inlinevirtual

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

Implements hpl::iResourceBase.

◆ destroy()

void hpl::iMaterial::destroy ( )
inlinevirtual

Free all memory.

Implements hpl::iResourceBase.

◆ StartRendering()

◆ EndRendering()

◆ GetBatchFlags()

◆ NextPass()

◆ HasMultiplePasses()

◆ GetType()

◆ IsTransperant()

virtual bool hpl::iMaterial::IsTransperant ( )
inlinevirtual

return true if the material is transparent

Returns

◆ UsesLights()

virtual bool hpl::iMaterial::UsesLights ( )
inlinevirtual

return true if the material has a light pass

Returns

◆ SetId()

void hpl::iMaterial::SetId ( int  alId)
inline

The type of the material

Parameters
alId

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