]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.h
now clears stencil to 128 instead of 0, this avoids problems with arbitrary incr...
[xonotic/darkplaces.git] / cl_screen.h
index 69fc72064b1d7d167ce84450700b2853f2074737..c48a2cf4592c859e7b961b2f87f097fc1fa001d5 100644 (file)
@@ -1,9 +1,11 @@
 
-// drawqueue stuff for use by client to feed 2D art to renderer
-#define MAX_DRAWQUEUE 1048576
+#ifndef CL_SCREEN_H
+#define CL_SCREEN_H
 
+// drawqueue stuff for use by client to feed 2D art to renderer
 #define DRAWQUEUE_PIC 0
 #define DRAWQUEUE_STRING 1
+#define DRAWQUEUE_MESH 2
 
 typedef struct drawqueue_s
 {
@@ -14,14 +16,34 @@ typedef struct drawqueue_s
 }
 drawqueue_t;
 
+// a triangle mesh... embedded in the drawqueue
+// each vertex is 4 floats (3 are used)
+// each texcoord is 4 floats (3 are used)
+// each color is 4 floats (4 are used)
+typedef struct drawqueuemesh_s
+{
+       rtexture_t *texture;
+       int numtriangles;
+       int numvertices;
+       int *indices;
+       float *vertices;
+       float *texcoords;
+       float *colors;
+}
+drawqueuemesh_t;
+
 #define DRAWFLAG_ADDITIVE 1
 
+// clear the draw queue
 void DrawQ_Clear(void);
+// draw an image
 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
-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);
+// draw a text string
+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);
+// draw a filled rectangle
 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
-// only used for player config menu
-void DrawQ_PicTranslate (int x, int y, char *picname, qbyte *translation);
+// draw a triangle mesh
+void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags);
 
 void SHOWLMP_decodehide(void);
 void SHOWLMP_decodeshow(void);
@@ -33,3 +55,6 @@ extern cvar_t scr_2dresolution;
 void CL_Screen_NewMap(void);
 void CL_Screen_Init(void);
 void CL_UpdateScreen(void);
+
+#endif
+