]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_textures.h
removed R_Mesh_Draw_NativeOnly (it was not used)
[xonotic/darkplaces.git] / r_textures.h
index 3684133f4c9bca1560ab406e98407cb1749c058a..d0646392f3e5c509359987ff2dd60c2fe58f8d8b 100644 (file)
@@ -1,4 +1,7 @@
 
+#ifndef R_TEXTURES_H
+#define R_TEXTURES_H
+
 // transparent
 #define TEXF_ALPHA 0x00000001
 // mipmapped
@@ -46,13 +49,16 @@ int R_CompatibleFragmentWidth(int width, int textype, int flags);
 
 // these two functions add a texture to a pool, and may precache (upload) it
 // a normal static texture
-rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, byte *data, int textype, int flags);
+rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, qbyte *data, int textype, int flags);
 // a procedurally generated texture, often animated over time, note: generate can be NULL (for odd uses)
-rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, int textype, int flags, int (*generate)(byte *buffer, int width, int height, void *parameterdata, int parameterdatasize), void *parameterdata, int parameterdatasize);
+rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, int textype, int flags, int (*generate)(qbyte *buffer, int width, int height, void *parameterdata, int parameterdatasize), void *parameterdata, int parameterdatasize);
+
+// free a texture
+void R_FreeTexture(rtexture_t *rt);
 
 // update the image data of a texture, used by lightmap updates and procedural
 // textures.
-void R_UpdateTexture(rtexture_t *rt, byte *data);
+void R_UpdateTexture(rtexture_t *rt, qbyte *data);
 
 // location of the fragment in the texture (note: any parameter except rt can be NULL)
 void R_FragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2);
@@ -68,3 +74,6 @@ int R_TextureWidth(rtexture_t *rt);
 
 // returns height of texture, as was specified when it was uploaded
 int R_TextureHeight(rtexture_t *rt);
+
+#endif
+