From 68ff265e8d5f2d52ba0761f78e645cf0df445acf Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 16 May 2023 23:47:02 +0300 Subject: [PATCH] ref: gl: switch texture object allocation to GenTextures usage This should fix most overlay programs but I only tested it on MangoHud --- ref/gl/gl_image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ref/gl/gl_image.c b/ref/gl/gl_image.c index 53c9542b..f34a2faf 100644 --- a/ref/gl/gl_image.c +++ b/ref/gl/gl_image.c @@ -1418,9 +1418,11 @@ static gl_texture_t *GL_AllocTexture( const char *name, texFlags_t flags ) // copy initial params Q_strncpy( tex->name, name, sizeof( tex->name )); + if( FBitSet( flags, TF_SKYSIDE )) tex->texnum = tr.skyboxbasenum++; - else tex->texnum = i; // texnum is used for fast acess into gl_textures array too + else pglGenTextures( 1, &tex->texnum ); + tex->flags = flags; // add to hash table