X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=r_textures.h;h=f31460acf139365b25de55bde9f03e2eae069a9f;hb=68809d17b6e8920a745bf72b29a0b44f222e5462;hp=f83aba32122f066cf5f1df754274ff2cf5f887f5;hpb=fd091d66e2673b19eb9c7d73d95160ef874de5e6;p=xonotic%2Fdarkplaces.git diff --git a/r_textures.h b/r_textures.h index f83aba32..f31460ac 100644 --- a/r_textures.h +++ b/r_textures.h @@ -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