- store the material layers in reference counted pointers in the FGameTexture object.

Reference counting is used because a texture image may be shared by more than one game texture.
This commit is contained in:
Christoph Oelckers 2020-04-17 01:03:21 +02:00
commit 42304d9680
5 changed files with 245 additions and 140 deletions

View file

@ -1093,9 +1093,6 @@ void FTextureManager::Init(void (*progressFunc_)(), void (*checkForHacks)(BuildI
DeleteAll();
//if (BuildTileFiles.Size() == 0) CountBuildTiles ();
// Texture 0 is a dummy texture used to indicate "no texture"
auto nulltex = MakeGameTexture(new FImageTexture(nullptr, ""), ETextureType::Null);
AddGameTexture (nulltex);
// This is for binding to unused texture units, because accessing an unbound texture unit is undefined. It's a one pixel empty texture.
auto emptytex = MakeGameTexture(new FImageTexture(CreateEmptyTexture(), ""), ETextureType::Override);
emptytex->SetSize(1, 1);