Skip to content

Commit 4a6dfa5

Browse files
committed
tr_image: upload _black, _red and _blackCube images as GL_RED
1 parent 5ff3091 commit 4a6dfa5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/engine/renderer/tr_image.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2644,7 +2644,7 @@ static void R_CreateBlackCubeImage()
26442644
}
26452645

26462646
imageParams_t imageParams = {};
2647-
imageParams.bits = IF_NOPICMIP;
2647+
imageParams.bits = IF_NOPICMIP | IF_RED;
26482648
imageParams.filterType = filterType_t::FT_LINEAR;
26492649
imageParams.wrapType = wrapTypeEnum_t::WT_EDGE_CLAMP;
26502650

@@ -2748,6 +2748,8 @@ void R_CreateBuiltinImages()
27482748

27492749
tr.whiteImage = R_CreateImage( "_white", ( const byte ** ) &dataPtr, DIMENSION, DIMENSION, 1, imageParams );
27502750

2751+
imageParams.bits = IF_NOPICMIP | IF_RED;
2752+
27512753
// we use a solid black image instead of disabling texturing
27522754
memset( data, 0, sizeof( data ) );
27532755
tr.blackImage = R_CreateImage( "_black", ( const byte ** ) &dataPtr, DIMENSION, DIMENSION, 1, imageParams );
@@ -2768,6 +2770,8 @@ void R_CreateBuiltinImages()
27682770
out[ 1 ] = out[ 3 ] = 255;
27692771
}
27702772

2773+
imageParams.bits = IF_NOPICMIP;
2774+
27712775
tr.greenImage = R_CreateImage( "_green", ( const byte ** ) &dataPtr, DIMENSION, DIMENSION, 1, imageParams );
27722776

27732777
// blue

0 commit comments

Comments
 (0)