Skip to content

Commit a2d5013

Browse files
committed
tr_image: reshape the cinematic image generation a bit
1 parent f1f3f52 commit a2d5013

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/engine/renderer/tr_image.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,12 +2794,14 @@ void R_CreateBuiltinImages()
27942794

27952795
tr.flatImage = R_CreateImage( "$flat", ( const byte ** ) &dataPtr, 1, 1, 1, imageParams );
27962796

2797+
/* Generate cinematic frames.
2798+
It is empty data to be filled by the cinematic code, but
2799+
we fill it with non-zero values so the format detector keeps all color channels. */
2800+
memset( data, 255, sizeof( data ) );
2801+
27972802
imageParams.bits = IF_NOPICMIP | IF_NOALPHA;
27982803
imageParams.wrapType = wrapTypeEnum_t::WT_CLAMP;
27992804

2800-
// Don't reuse previously set data, we test the values for selecting the upload format.
2801-
memset( data, 255, sizeof( data ) );
2802-
28032805
size_t numCinematicImages = 0;
28042806
for ( image_t * &image : tr.cinematicImage )
28052807
{

0 commit comments

Comments
 (0)