@@ -1038,14 +1038,7 @@ void R_UploadImage( const byte **dataArray, int numLayers, int numMips,
10381038 // select proper internal format
10391039 if ( samples == 3 )
10401040 {
1041- if ( glConfig.textureCompression == textureCompression_t::TC_S3TC && !(image->bits & IF_NOCOMPRESSION ) )
1042- {
1043- internalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
1044- }
1045- else
1046- {
1047- internalFormat = GL_RGB8;
1048- }
1041+ internalFormat = GL_RGB8;
10491042 }
10501043 else if ( samples == 4 )
10511044 {
@@ -1055,25 +1048,7 @@ void R_UploadImage( const byte **dataArray, int numLayers, int numMips,
10551048 }
10561049 else
10571050 {
1058- if ( glConfig.textureCompression == textureCompression_t::TC_S3TC && !( image->bits & IF_NOCOMPRESSION ) )
1059- {
1060- if ( image->bits & IF_DISPLACEMAP )
1061- {
1062- internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
1063- }
1064- else if ( image->bits & IF_ALPHATEST )
1065- {
1066- internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
1067- }
1068- else
1069- {
1070- internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
1071- }
1072- }
1073- else
1074- {
1075- internalFormat = GL_RGBA8;
1076- }
1051+ internalFormat = GL_RGBA8;
10771052 }
10781053 }
10791054 }
@@ -1804,8 +1779,6 @@ image_t *R_FindImageFile( const char *imageName, int bits, filterType_t f
18041779 if ( bits & IF_LIGHTMAP )
18051780 {
18061781 R_ProcessLightmap ( pic[ 0 ], 4 , width, height, bits, pic[ 0 ] );
1807-
1808- bits |= IF_NOCOMPRESSION;
18091782 }
18101783
18111784 image = R_CreateImage ( ( char * ) buffer, (const byte **)pic,
@@ -2353,7 +2326,7 @@ static void R_CreateContrastRenderFBOImage()
23532326 width = glConfig.vidWidth * 0 .25f ;
23542327 height = glConfig.vidHeight * 0 .25f ;
23552328
2356- tr.contrastRenderFBOImage = R_CreateImage ( " _contrastRenderFBO" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_CLAMP );
2329+ tr.contrastRenderFBOImage = R_CreateImage ( " _contrastRenderFBO" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_CLAMP );
23572330}
23582331
23592332static void R_CreateBloomRenderFBOImage ()
@@ -2366,7 +2339,7 @@ static void R_CreateBloomRenderFBOImage()
23662339
23672340 for ( i = 0 ; i < 2 ; i++ )
23682341 {
2369- tr.bloomRenderFBOImage [ i ] = R_CreateImage ( va ( " _bloomRenderFBO%d" , i ), nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_CLAMP );
2342+ tr.bloomRenderFBOImage [ i ] = R_CreateImage ( va ( " _bloomRenderFBO%d" , i ), nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_CLAMP );
23702343 }
23712344}
23722345
@@ -2377,9 +2350,9 @@ static void R_CreateCurrentRenderImage()
23772350 width = glConfig.vidWidth ;
23782351 height = glConfig.vidHeight ;
23792352
2380- tr.currentRenderImage [0 ] = R_CreateImage ( " _currentRender[0]" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2381- tr.currentRenderImage [1 ] = R_CreateImage ( " _currentRender[1]" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2382- tr.currentDepthImage = R_CreateImage ( " _currentDepth" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION | IF_PACKED_DEPTH24_STENCIL8, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2353+ tr.currentRenderImage [0 ] = R_CreateImage ( " _currentRender[0]" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2354+ tr.currentRenderImage [1 ] = R_CreateImage ( " _currentRender[1]" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2355+ tr.currentDepthImage = R_CreateImage ( " _currentDepth" , nullptr , width, height, 1 , IF_NOPICMIP | IF_PACKED_DEPTH24_STENCIL8, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
23832356}
23842357
23852358static void R_CreateDepthRenderImage ()
@@ -2416,7 +2389,7 @@ static void R_CreatePortalRenderImage()
24162389 width = glConfig.vidWidth ;
24172390 height = glConfig.vidHeight ;
24182391
2419- tr.portalRenderImage = R_CreateImage ( " _portalRender" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2392+ tr.portalRenderImage = R_CreateImage ( " _portalRender" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
24202393}
24212394
24222395static void R_CreateDepthToColorFBOImages ()
@@ -2427,8 +2400,8 @@ static void R_CreateDepthToColorFBOImages()
24272400 height = glConfig.vidHeight ;
24282401
24292402 {
2430- tr.depthToColorBackFacesFBOImage = R_CreateImage ( " _depthToColorBackFacesFBORender" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2431- tr.depthToColorFrontFacesFBOImage = R_CreateImage ( " _depthToColorFrontFacesFBORender" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2403+ tr.depthToColorBackFacesFBOImage = R_CreateImage ( " _depthToColorBackFacesFBORender" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2404+ tr.depthToColorFrontFacesFBOImage = R_CreateImage ( " _depthToColorFrontFacesFBORender" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
24322405 }
24332406}
24342407
@@ -2440,11 +2413,11 @@ static void R_CreateDownScaleFBOImages()
24402413 width = glConfig.vidWidth * 0 .25f ;
24412414 height = glConfig.vidHeight * 0 .25f ;
24422415
2443- tr.downScaleFBOImage_quarter = R_CreateImage ( " _downScaleFBOImage_quarter" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2416+ tr.downScaleFBOImage_quarter = R_CreateImage ( " _downScaleFBOImage_quarter" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
24442417
24452418 width = height = 64 ;
24462419
2447- tr.downScaleFBOImage_64x64 = R_CreateImage ( " _downScaleFBOImage_64x64" , nullptr , width, height, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
2420+ tr.downScaleFBOImage_64x64 = R_CreateImage ( " _downScaleFBOImage_64x64" , nullptr , width, height, 1 , IF_NOPICMIP, filterType_t::FT_NEAREST, wrapTypeEnum_t::WT_CLAMP );
24482421}
24492422
24502423// *INDENT-OFF*
@@ -2665,7 +2638,7 @@ static void R_CreateColorGradeImage()
26652638 REF_COLORGRADEMAP_SIZE,
26662639 REF_COLORGRADEMAP_SIZE,
26672640 REF_COLORGRADE_SLOTS * REF_COLORGRADEMAP_SIZE,
2668- IF_NOPICMIP | IF_NOCOMPRESSION | IF_NOLIGHTSCALE,
2641+ IF_NOPICMIP | IF_NOLIGHTSCALE,
26692642 filterType_t::FT_LINEAR,
26702643 wrapTypeEnum_t::WT_EDGE_CLAMP );
26712644
@@ -2769,7 +2742,7 @@ void R_CreateBuiltinImages()
27692742
27702743 tr.quadraticImage =
27712744 R_CreateImage ( " _quadratic" , ( const byte ** ) &dataPtr,
2772- DEFAULT_SIZE, DEFAULT_SIZE, 1 , IF_NOPICMIP | IF_NOCOMPRESSION , filterType_t::FT_LINEAR,
2745+ DEFAULT_SIZE, DEFAULT_SIZE, 1 , IF_NOPICMIP, filterType_t::FT_LINEAR,
27732746 wrapTypeEnum_t::WT_CLAMP );
27742747
27752748 R_CreateRandomNormalsImage ();
@@ -2890,5 +2863,5 @@ qhandle_t RE_GenerateTexture( const byte *pic, int width, int height )
28902863{
28912864 const char *name = va ( " rocket%d" , numTextures++ );
28922865 R_SyncRenderThread ();
2893- return RE_RegisterShaderFromImage ( name, R_CreateImage ( name, &pic, width, height, 1 , IF_NOCOMPRESSION | IF_NOPICMIP, filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_CLAMP ) );
2866+ return RE_RegisterShaderFromImage ( name, R_CreateImage ( name, &pic, width, height, 1 , IF_NOPICMIP, filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_CLAMP ) );
28942867}
0 commit comments