28#ifndef HPL_VERTEXBUFFER_OGL_H
29#define HPL_VERTEXBUFFER_OGL_H
31#include "common/scummsys.h"
32#include "hpl1/engine/graphics/VertexBuffer.h"
33#include "hpl1/opengl.h"
39class cVertexBufferOGL :
public iVertexBuffer {
41 cVertexBufferOGL(iLowLevelGraphics *apLowLevelGraphics, tVertexFlag aFlags,
42 eVertexBufferDrawType aDrawType, eVertexBufferUsageType aUsageType,
43 int alReserveVtxSize,
int alReserveIdxSize);
46 void AddVertex(tVertexFlag aType,
const cVector3f &avVtx);
47 void AddColor(tVertexFlag aType,
const cColor &aColor);
48 void AddIndex(
unsigned int alIndex);
50 bool Compile(tVertexCompileFlag aFlags);
51 void UpdateData(tVertexFlag aTypes,
bool abIndices);
53 void CreateShadowDouble(
bool abUpdateData);
55 void Transform(
const cMatrixf &mtxTransform);
57 void Draw(eVertexBufferDrawType aDrawType);
58 void DrawIndices(
unsigned int *apIndices,
int alCount,
59 eVertexBufferDrawType aDrawType = eVertexBufferDrawType_LastEnum);
64 iVertexBuffer *CreateCopy(eVertexBufferUsageType aUsageType);
66 cBoundingVolume CreateBoundingVolume();
68 float *GetArray(tVertexFlag aType);
69 unsigned int *GetIndices();
71 void ResizeArray(tVertexFlag aType,
int alSize);
72 void ResizeIndices(
int alSize);
78 cVector3f GetVector3(tVertexFlag aType,
unsigned alIdx);
79 cVector3f GetVector4(tVertexFlag aType,
unsigned alIdx);
80 cColor GetColor(tVertexFlag aType,
unsigned alIdx);
81 unsigned int GetIndex(tVertexFlag aType,
unsigned alIdx);
84 void SetVertexStates(tVertexFlag aFlags);
86 tFloatVec mvVertexArray[klNumOfVertexFlags];
87 tUIntVec mvIndexArray;
91 bool mbHasShadowDouble;