From: uis Date: Fri, 16 Aug 2024 21:33:44 +0000 (+0300) Subject: gl_textures: don't load cubemap when not supported X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=53f136adc172d800b328637823137c10d9b53efb;p=xonotic%2Fdarkplaces.git gl_textures: don't load cubemap when not supported --- diff --git a/gl_textures.c b/gl_textures.c index 3ec1ae59..d77f66b9 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -1206,6 +1206,12 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden } } + if (texturetype == GLTEXTURETYPE_CUBEMAP && vid.maxtexturesize_cubemap == 0) + { + Con_Printf ("R_LoadTexture: cubemap texture not supported by driver\n"); + return NULL; + } + texinfo = R_GetTexTypeInfo(textype, flags); size = width * height * depth * sides * texinfo->inputbytesperpixel; if (size < 1)