fix problems with missing cubemap textures in GLSL
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Jul 2005 10:10:38 +0000 (10:10 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Jul 2005 10:10:38 +0000 (10:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5490 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 08a69c5..fe2e6af 100644 (file)
@@ -3130,6 +3130,8 @@ rtexture_t *R_Shadow_Cubemap(const char *basename)
        numcubemaps++;
        strcpy(cubemaps[i].basename, basename);
        cubemaps[i].texture = R_Shadow_LoadCubemap(cubemaps[i].basename);
+       if (!cubemaps[i].texture)
+               cubemaps[i].texture = r_texture_whitecube;
        return cubemaps[i].texture;
 }