]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
modified R_GetTexture to return the texnum of r_texture_white if given NULL
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Mar 2006 06:27:07 +0000 (06:27 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Mar 2006 06:27:07 +0000 (06:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6126 d7cf8633-e32d-0410-b094-e92efae38249

r_textures.h

index 6a0c46bf09e122cc7dace722e42f4b8f65e37259..080aa3140594463217b2f05925cdbdd202385d1a 100644 (file)
@@ -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)