Skip to content
8 changes: 5 additions & 3 deletions src/engine/renderer/tr_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2794,12 +2794,14 @@ void R_CreateBuiltinImages()

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

/* Generate cinematic frames.
It is empty data to be filled by the cinematic code, but
we fill it with non-zero values so the format detector keeps all color channels. */
memset( data, 255, sizeof( data ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we even passing in data there? Can't we put in nullptr for the data like when making an FBO?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea, but that would have to be investigated for another PR, not this one.


imageParams.bits = IF_NOPICMIP | IF_NOALPHA;
imageParams.wrapType = wrapTypeEnum_t::WT_CLAMP;

// Don't reuse previously set data, we test the values for selecting the upload format.
memset( data, 255, sizeof( data ) );

size_t numCinematicImages = 0;
for ( image_t * &image : tr.cinematicImage )
{
Expand Down