ScummVM API documentation
hpl::iVertexBuffer Class Referenceabstract

Public Member Functions

 iVertexBuffer (iLowLevelGraphics *apLowLevelGraphics, tVertexFlag aFlags, eVertexBufferDrawType aDrawType, eVertexBufferUsageType aUsageType, int alReserveVtxSize, int alReserveIdxSize)
 
tVertexFlag GetFlags ()
 
virtual void AddVertex (tVertexFlag aType, const cVector3f &avVtx)=0
 
virtual void AddColor (tVertexFlag aType, const cColor &aColor)=0
 
virtual void AddIndex (unsigned int alIndex)=0
 
virtual bool Compile (tVertexCompileFlag aFlags)=0
 
virtual void UpdateData (tVertexFlag aTypes, bool abIndices)=0
 
virtual void CreateShadowDouble (bool abUpdateData)=0
 
virtual void Transform (const cMatrixf &mtxTransform)=0
 
virtual void Draw (eVertexBufferDrawType aDrawType=eVertexBufferDrawType_LastEnum)=0
 
virtual void DrawIndices (unsigned int *apIndices, int alCount, eVertexBufferDrawType aDrawType=eVertexBufferDrawType_LastEnum)=0
 
virtual void Bind ()=0
 
virtual void UnBind ()=0
 
virtual iVertexBuffer * CreateCopy (eVertexBufferUsageType aUsageType)=0
 
virtual cBoundingVolume CreateBoundingVolume ()=0
 
virtual float * GetArray (tVertexFlag aType)=0
 
virtual unsigned int * GetIndices ()=0
 
virtual int GetVertexNum ()=0
 
virtual int GetIndexNum ()=0
 
virtual void ResizeArray (tVertexFlag aType, int alSize)=0
 
virtual void ResizeIndices (int alSize)=0
 
virtual cVector3f GetVector3 (tVertexFlag aType, unsigned alIdx)=0
 
virtual cVector3f GetVector4 (tVertexFlag aType, unsigned alIdx)=0
 
virtual cColor GetColor (tVertexFlag aType, unsigned alIdx)=0
 
virtual unsigned int GetIndex (tVertexFlag aType, unsigned alIdx)=0
 
void SetElementNum (int alNum)
 
int GetElementNum ()
 
tVertexFlag GetVertexFlags ()
 
bool HasTangents ()
 
void SetTangents (bool abX)
 

Protected Attributes

tVertexFlag mVertexFlags
 
eVertexBufferDrawType mDrawType
 
eVertexBufferUsageType mUsageType
 
iLowLevelGraphics * mpLowLevelGraphics
 
int mlElementNum
 
bool mbTangents
 

Member Function Documentation

◆ CreateShadowDouble()

virtual void hpl::iVertexBuffer::CreateShadowDouble ( bool  abUpdateData)
pure virtual

This creates a double of the vertex array with w=0.

Parameters
abUpdateDataif the hardware buffer should be updated as well.

◆ Transform()

virtual void hpl::iVertexBuffer::Transform ( const cMatrixf &  mtxTransform)
pure virtual

Transform the entire buffer with transform.

◆ ResizeArray()

virtual void hpl::iVertexBuffer::ResizeArray ( tVertexFlag  aType,
int  alSize 
)
pure virtual

Resizes an array to a custom size, the size is number of elements and NOT number of vertices.

◆ SetElementNum()

void hpl::iVertexBuffer::SetElementNum ( int  alNum)
inline

Set the number of of elements to draw.

Parameters
alNumIf < 0, draw all indices.

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