1 /*
2 ===========================================================================
3 Copyright (C) 1999 - 2005, Id Software, Inc.
4 Copyright (C) 2000 - 2013, Raven Software, Inc.
5 Copyright (C) 2001 - 2013, Activision, Inc.
6 Copyright (C) 2013 - 2015, OpenJK contributors
7 
8 This file is part of the OpenJK source code.
9 
10 OpenJK is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License version 2 as
12 published by the Free Software Foundation.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, see <http://www.gnu.org/licenses/>.
21 ===========================================================================
22 */
23 
24 #include "tr_local.h"
25 
26 // tr_QuickSprite.h: interface for the CQuickSprite class.
27 //
28 //////////////////////////////////////////////////////////////////////
29 
30 #pragma once
31 
32 class CQuickSpriteSystem
33 {
34 private:
35 			textureBundle_t	*mTexBundle;
36 			uint32_t	mGLStateBits;
37 			int				mFogIndex;
38 			qboolean		mUseFog;
39 			vec4_t			mVerts[SHADER_MAX_VERTEXES];
40 			vec2_t			mTextureCoords[SHADER_MAX_VERTEXES];	// Ideally this would be static, cause it never changes
41 			vec2_t			mFogTextureCoords[SHADER_MAX_VERTEXES];
42 			uint32_t		mColors[SHADER_MAX_VERTEXES];
43 			int				mNextVert;
44 			qboolean		mTurnCullBackOn;
45 
46 			void Flush(void);
47 
48 public:
49 			CQuickSpriteSystem(void);
50 			~CQuickSpriteSystem(void);
51 
52 			void StartGroup(textureBundle_t *bundle, uint32_t glbits, int fogIndex = -1);
53 			void EndGroup(void);
54 
55 			void Add(float *pointdata, color4ub_t color, vec2_t fog=NULL);
56 };
57 
58 extern CQuickSpriteSystem SQuickSprite;
59