diff options
author | Zack Middleton <zturtleman@gmail.com> | 2015-10-16 03:16:26 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 11:12:56 +0100 |
commit | 2680cae42a9009628ded887d9470ed8abf45fc0f (patch) | |
tree | 18cb40e0ccc53648adb89e8edf45ff4dd87f7e84 /src/renderergl1 | |
parent | c65bd7998d56cae2670b30e84a2dbc547002d65d (diff) |
Add support for uncompressed image upload flag to OpenGL1
Diffstat (limited to 'src/renderergl1')
-rw-r--r-- | src/renderergl1/tr_image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/renderergl1/tr_image.c b/src/renderergl1/tr_image.c index e3a1f2eb..2ed43ef0 100644 --- a/src/renderergl1/tr_image.c +++ b/src/renderergl1/tr_image.c @@ -558,6 +558,7 @@ static void Upload32( unsigned *data, qboolean mipmap, qboolean picmip, qboolean lightMap, + qboolean allowCompression, int *format, int *pUploadWidth, int *pUploadHeight ) { @@ -693,11 +694,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; } @@ -893,6 +894,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 ); |