]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - cl_screen.h
fix chthon lightning (ugh, how did I manage to use polygon lightning for this, I...
[xonotic/darkplaces.git] / cl_screen.h
1
2 #ifndef CL_SCREEN_H
3 #define CL_SCREEN_H
4
5 // drawqueue stuff for use by client to feed 2D art to renderer
6 #define DRAWQUEUE_PIC 0
7 #define DRAWQUEUE_STRING 1
8 #define DRAWQUEUE_MESH 2
9
10 typedef struct drawqueue_s
11 {
12         unsigned short size;
13         qbyte command, flags;
14         unsigned int color;
15         float x, y, scalex, scaley;
16 }
17 drawqueue_t;
18
19 // a triangle mesh... embedded in the drawqueue
20 // each vertex is 4 floats (3 are used)
21 // each texcoord is 4 floats (3 are used)
22 // each color is 4 floats (4 are used)
23 typedef struct drawqueuemesh_s
24 {
25         rtexture_t *texture;
26         int numtriangles;
27         int numvertices;
28         int *indices;
29         float *vertices;
30         float *texcoords;
31         float *colors;
32 }
33 drawqueuemesh_t;
34
35 #define DRAWFLAG_ADDITIVE 1
36
37 // clear the draw queue
38 void DrawQ_Clear(void);
39 // draw an image
40 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
41 // draw a text string
42 void DrawQ_String(float x, float y, const char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
43 // draw a filled rectangle
44 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
45 // draw a triangle mesh
46 void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags);
47
48 void SHOWLMP_decodehide(void);
49 void SHOWLMP_decodeshow(void);
50 void SHOWLMP_drawall(void);
51 void SHOWLMP_clear(void);
52
53 extern cvar_t scr_2dresolution;
54
55 void CL_Screen_NewMap(void);
56 void CL_Screen_Init(void);
57 void CL_UpdateScreen(void);
58
59 #endif
60