From ce35188acd270c75d766681016ae26fa030b5315 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 16 Oct 2015 03:16:26 -0500 Subject: [PATCH] Add support for uncompressed image upload flag to OpenGL1 --- code/renderergl1/tr_image.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/renderergl1/tr_image.c b/code/renderergl1/tr_image.c index 7905842b..b131f366 100644 --- a/code/renderergl1/tr_image.c +++ b/code/renderergl1/tr_image.c @@ -557,6 +557,7 @@ static void Upload32( unsigned *data, qboolean mipmap, qboolean picmip, qboolean lightMap, + qboolean allowCompression, int *format, int *pUploadWidth, int *pUploadHeight ) { @@ -692,11 +693,11 @@ static void Upload32( unsigned *data, } else { - if ( glConfig.textureCompression == TC_S3TC_ARB ) + if ( allowCompression && glConfig.textureCompression == TC_S3TC_ARB ) { internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; } - else if ( glConfig.textureCompression == TC_S3TC ) + else if ( allowCompression && glConfig.textureCompression == TC_S3TC ) { internalFormat = GL_RGB4_S3TC; } @@ -892,6 +893,7 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height, image->flags & IMGFLAG_MIPMAP, image->flags & IMGFLAG_PICMIP, isLightmap, + !(image->flags & IMGFLAG_NO_COMPRESSION), &image->internalFormat, &image->uploadWidth, &image->uploadHeight );