From 373321ff00a057e93f741ed35edca9e21b4e06af Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 16 Dec 2023 19:46:08 +0300 Subject: [PATCH] ref/gl: do not set type on 1D textures on GLES (will fallback to 2D) --- ref/gl/gl_image.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ref/gl/gl_image.c b/ref/gl/gl_image.c index 1b602c87..6b200dfe 100644 --- a/ref/gl/gl_image.c +++ b/ref/gl/gl_image.c @@ -631,9 +631,12 @@ static void GL_SetTextureTarget( gl_texture_t *tex, rgbdata_t *pic ) pic->numMips = Q_max( 1, pic->numMips ); // trying to determine texture type +#ifndef XASH_GLES if( pic->width > 1 && pic->height <= 1 ) tex->target = GL_TEXTURE_1D; - else if( FBitSet( pic->flags, IMAGE_CUBEMAP )) + else +#endif // just skip first condition + if( FBitSet( pic->flags, IMAGE_CUBEMAP )) tex->target = GL_TEXTURE_CUBE_MAP_ARB; else if( FBitSet( pic->flags, IMAGE_MULTILAYER ) && pic->depth >= 1 ) tex->target = GL_TEXTURE_2D_ARRAY_EXT;