]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - cl_screen.h
surfaces are now texture sorted rather than shader sorted, OpaqueWall renderers have...
[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 typedef struct drawqueuemesh_s
21 {
22         rtexture_t *texture;
23         int numindices;
24         int numvertices;
25         int *indices;
26         float *vertices;
27         float *texcoords;
28         qbyte *colors;
29 }
30 drawqueuemesh_t;
31
32 #define DRAWFLAG_ADDITIVE 1
33
34 // clear the draw queue
35 void DrawQ_Clear(void);
36 // draw an image
37 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
38 // draw a text string
39 void DrawQ_String(float x, float y, char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
40 // draw a filled rectangle
41 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
42 // draw a triangle mesh
43 void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags);
44
45 void SHOWLMP_decodehide(void);
46 void SHOWLMP_decodeshow(void);
47 void SHOWLMP_drawall(void);
48 void SHOWLMP_clear(void);
49
50 extern cvar_t scr_2dresolution;
51
52 void CL_Screen_NewMap(void);
53 void CL_Screen_Init(void);
54 void CL_UpdateScreen(void);
55
56 #endif
57