]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - draw.h
added a few more CHECKGLERROR lines, and the possibility of not having
[xonotic/darkplaces.git] / draw.h
diff --git a/draw.h b/draw.h
index c9c8b745b949d7369b3933a70cff34c0a6e17cd8..e3651266f3cafb7b30de8b13bc2be7b29d9022b1 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -29,6 +29,12 @@ typedef struct cachepic_s
 {
        // size of pic
        int width, height;
+       // this flag indicates that it should be loaded and unloaded on demand
+       int autoload;
+       // texture flags to upload with
+       int texflags;
+       // texture may be freed after a while
+       int lastusedframe;
        // renderer texture to use
        rtexture_t *tex;
        // used for hash lookups
@@ -48,6 +54,7 @@ typedef enum cachepicflags_e
 cachepicflags_t;
 
 void Draw_Init (void);
+void Draw_Frame (void);
 cachepic_t *Draw_CachePic_Flags (const char *path, unsigned int cachepicflags);
 cachepic_t *Draw_CachePic (const char *path); // standard function with no options, used throughout engine
 // create or update a pic's image
@@ -64,6 +71,7 @@ typedef struct drawqueuemesh_s
        rtexture_t *texture;
        int num_triangles;
        int num_vertices;
+       int *data_element3i;
        unsigned short *data_element3s;
        float *data_vertex3f;
        float *data_texcoord2f;
@@ -76,6 +84,7 @@ DRAWFLAG_NORMAL,
 DRAWFLAG_ADDITIVE,
 DRAWFLAG_MODULATE,
 DRAWFLAG_2XMODULATE,
+DRAWFLAG_SCREEN,
 DRAWFLAG_NUMFLAGS,
 DRAWFLAG_MASK = 0xFF,   // ONLY R_BeginPolygon()
 DRAWFLAG_MIPMAP = 0x100 // ONLY R_BeginPolygon()
@@ -109,11 +118,15 @@ extern dp_font_t dp_fonts[MAX_FONTS];
 #define STRING_COLOR_TAG                       '^'
 #define STRING_COLOR_DEFAULT           7
 #define STRING_COLOR_DEFAULT_STR       "^7"
+#define STRING_COLOR_RGB_TAG_CHAR      'x'
+#define STRING_COLOR_RGB_TAG           "^x"
 
 // all of these functions will set r_defdef.draw2dstage if not in 2D rendering mode (and of course prepare for 2D rendering in that case)
 
 // draw an image (or a filled rectangle if pic == NULL)
 void DrawQ_Pic(float x, float y, cachepic_t *pic, float width, float height, float red, float green, float blue, float alpha, int flags);
+// draw a rotated image
+void DrawQ_RotPic(float x, float y, cachepic_t *pic, float width, float height, float org_x, float org_y, float angle, float red, float green, float blue, float alpha, int flags);
 // draw a filled rectangle (slightly faster than DrawQ_Pic with pic = NULL)
 void DrawQ_Fill(float x, float y, float width, float height, float red, float green, float blue, float alpha, int flags);
 // draw a text string,