Skip to content

Commit d802326

Browse files
committed
tr_image: do not rely on previously set data for cinematic, numberize and rename as *name
1 parent 81e88e7 commit d802326

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/engine/renderer/tr_image.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2700,9 +2700,14 @@ void R_CreateBuiltinImages()
27002700
imageParams.bits = IF_NOPICMIP;
27012701
imageParams.wrapType = wrapTypeEnum_t::WT_CLAMP;
27022702

2703+
// Don't reuse previously set data, we test the values for selecting the upload format.
2704+
memset( data, 255, sizeof( data ) );
2705+
2706+
size_t numCinematicImages = 0;
27032707
for ( image_t * &image : tr.cinematicImage )
27042708
{
2705-
image = R_CreateImage( "_cinematic", ( const byte ** ) &dataPtr, 1, 1, 1, imageParams );
2709+
std::string name = Str::Format( "*cinematic%d", numCinematicImages++ );
2710+
image = R_CreateImage( name.c_str(), ( const byte ** ) &dataPtr, 1, 1, 1, imageParams );
27062711
}
27072712

27082713
R_CreateContrastRenderFBOImage();

0 commit comments

Comments
 (0)