]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_textures.h
fix lightmap loading from TGAs; fix display of QC-initiated downloads
[xonotic/darkplaces.git] / r_textures.h
index f83aba32122f066cf5f1df754274ff2cf5f887f5..f31460acf139365b25de55bde9f03e2eae069a9f 100644 (file)
@@ -20,6 +20,8 @@
 #define TEXF_PICMIP 0x00000100
 // indicates texture should be compressed if possible
 #define TEXF_COMPRESS 0x00000200
+// use this flag to block R_PurgeTexture from freeing a texture
+#define TEXF_PERSISTENT 0x00000400
 // used for checking if textures mismatch
 #define TEXF_IMPORTANTBITS (TEXF_ALPHA | TEXF_MIPMAP | TEXF_CLAMP | TEXF_FORCENEAREST | TEXF_FORCELINEAR | TEXF_PICMIP | TEXF_COMPRESS)
 
@@ -97,12 +99,19 @@ int R_TextureWidth(rtexture_t *rt);
 // returns height of texture, as was specified when it was uploaded
 int R_TextureHeight(rtexture_t *rt);
 
+// only frees the texture if TEXF_PERSISTENT is not set
+// also resets the variable
+void R_PurgeTexture(rtexture_t *prt);
+
 // frees processing buffers each frame, and may someday animate procedural textures
 void R_Textures_Frame(void);
 
 // maybe rename this - sounds awful? [11/21/2007 Black]
 void R_MarkDirtyTexture(rtexture_t *rt);
-void R_MakeTextureDynamic(rtexture_t *rt, updatecallback_t updatecallback, void *data); 
+void R_MakeTextureDynamic(rtexture_t *rt, updatecallback_t updatecallback, void *data);
+
+// Clear the texture's contents
+void R_ClearTexture (rtexture_t *rt);
 
 #endif