From 53f136adc172d800b328637823137c10d9b53efb Mon Sep 17 00:00:00 2001 From: uis Date: Sat, 17 Aug 2024 00:33:44 +0300 Subject: [PATCH] gl_textures: don't load cubemap when not supported --- gl_textures.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.2