diff --git a/src/gl/data/gl_vertexbuffer.h b/src/gl/data/gl_vertexbuffer.h index 50ddd7d13..f82172d08 100644 --- a/src/gl/data/gl_vertexbuffer.h +++ b/src/gl/data/gl_vertexbuffer.h @@ -44,7 +44,6 @@ struct FFlatVertex class FFlatVertexBuffer : public FVertexBuffer { FFlatVertex *map; - FFlatVertex mDrawBuffer[1000]; unsigned int mIndex; unsigned int mCurIndex; @@ -170,5 +169,37 @@ public: #define VSO ((FSkyVertex*)NULL) +struct FModelVertex +{ + float x, y, z; // world position + float u, v; // texture coordinates + + void Set(float xx, float yy, float zz, float uu, float vv) + { + x = xx; + y = yy; + z = zz; + u = uu; + v = vv; + } +}; + + +class FModelVertexBuffer : public FVertexBuffer +{ + int mIndexFrame[2]; + +public: + TArray vbo_shadowdata; // this is kept around for interpolating on GL 2.0 + + FModelVertexBuffer(); + ~FModelVertexBuffer(); + + void BindVBO(); + void UpdateBufferPointers(int frame1, int frame2); +}; + +#define VMO ((FModelVertex*)NULL) + #endif \ No newline at end of file diff --git a/src/gl/models/gl_models.h b/src/gl/models/gl_models.h index ebfb8b8c5..4ba206983 100644 --- a/src/gl/models/gl_models.h +++ b/src/gl/models/gl_models.h @@ -2,9 +2,11 @@ #define __GL_MODELS_H_ #include "gl/utility/gl_geometric.h" +#include "gl/data/gl_vertexbuffer.h" #include "p_pspr.h" #include "r_data/voxels.h" + #define MAX_LODS 4 enum { VX, VZ, VY };