forked from JACoders/OpenJK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtr_quicksprite.h
37 lines (29 loc) · 1.06 KB
/
tr_quicksprite.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
// this include must remain at the top of every CPP file
//#include "qcommon/q_math.h"
//#include "tr_headers.h"
// tr_QuickSprite.h: interface for the CQuickSprite class.
//
//////////////////////////////////////////////////////////////////////
class CQuickSpriteSystem
{
private:
textureBundle_t *mTexBundle;
unsigned long mGLStateBits;
int mFogIndex;
qboolean mUseFog;
vec4_t mVerts[SHADER_MAX_VERTEXES];
unsigned int mIndexes[SHADER_MAX_VERTEXES]; // Ideally this would be static, cause it never changes
vec2_t mTextureCoords[SHADER_MAX_VERTEXES]; // Ideally this would be static, cause it never changes
vec2_t mFogTextureCoords[SHADER_MAX_VERTEXES];
unsigned long mColors[SHADER_MAX_VERTEXES];
int mNextVert;
void Flush(void);
public:
CQuickSpriteSystem();
virtual ~CQuickSpriteSystem();
void StartGroup(textureBundle_t *bundle, unsigned long glbits, int fogIndex = -1);
void EndGroup(void);
void Add(float *pointdata, color4ub_t color, vec2_t fog=NULL);
};
extern CQuickSpriteSystem SQuickSprite;