]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
apropos command
[xonotic/darkplaces.git] / gl_textures.c
index 0178133b2d5087972b3491872a3a13a1b14519f6..fe13aca500ea487f28821db2deb3aa87fe648aed 100644 (file)
@@ -308,7 +308,7 @@ void R_FreeTexture(rtexture_t *rt)
        else
                Host_Error("R_FreeTexture: texture \"%s\" not linked in pool", glt->identifier);
 
-       if (glt->texnum > 0)
+       if (!(glt->flags & GLTEXF_UPLOAD))
        {
                CHECKGLERROR
                qglDeleteTextures(1, (GLuint *)&glt->texnum);CHECKGLERROR
@@ -1064,6 +1064,9 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden
        GL_Texture_CalcImageSize(glt->texturetype, glt->flags, glt->inputwidth, glt->inputheight, glt->inputdepth, &glt->tilewidth, &glt->tileheight, &glt->tiledepth);
        R_PrecacheTexture(glt);
 
+       // texture converting and uploading can take a while, so make sure we're sending keepalives
+       CL_KeepaliveMessage(false);
+
        return (rtexture_t *)glt;
 }