From: havoc Date: Fri, 17 Mar 2006 06:27:07 +0000 (+0000) Subject: modified R_GetTexture to return the texnum of r_texture_white if given NULL X-Git-Tag: xonotic-v0.1.0preview~4193 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=64c108f956e3037901f19e0126661d9e8faf8831;p=xonotic%2Fdarkplaces.git modified R_GetTexture to return the texnum of r_texture_white if given NULL git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6126 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_textures.h b/r_textures.h index 6a0c46bf..080aa314 100644 --- a/r_textures.h +++ b/r_textures.h @@ -80,7 +80,7 @@ void R_FragmentLocation3D(rtexture_t *rt, int *x, int *y, int *z, float *fx1, fl // returns the renderer dependent texture slot number (call this before each // use, as a texture might not have been precached) -#define R_GetTexture(rt) ((rt) ? ((rt)->texnum >= 0 ? (rt)->texnum : R_RealGetTexture(rt)) : 0) +#define R_GetTexture(rt) ((rt) ? ((rt)->texnum >= 0 ? (rt)->texnum : R_RealGetTexture(rt)) : r_texture_white->texnum) int R_RealGetTexture (rtexture_t *rt); // returns true if the texture is transparent (useful for rendering code)