mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-24 21:01:35 +00:00
definition for model vertex buffer.
This commit is contained in:
parent
e6f14b055a
commit
965a2a2d79
2 changed files with 34 additions and 1 deletions
|
@ -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<FModelVertex> 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
|
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue