Use FImageTexture for thre null texture

FDummyTexture had a big problem: Whenever it was accessed by accident it crashed the app because it wasn't fully implemented.

What it should do is return empty pixels of the given size, and an unextended FImageTexture is doing just that.
This commit is contained in:
Christoph Oelckers 2018-12-10 02:50:22 +01:00
commit 0d07fb2550
4 changed files with 13 additions and 31 deletions

View file

@ -1003,7 +1003,9 @@ void FTextureManager::Init()
FTexture::InitGrayMap();
// Texture 0 is a dummy texture used to indicate "no texture"
AddTexture (new FDummyTexture);
auto nulltex = new FImageTexture(nullptr);
nulltex->SetUseType(ETextureType::Null);
AddTexture (nulltex);
// some special textures used in the game.
AddTexture(CreateShaderTexture(false, false));
AddTexture(CreateShaderTexture(false, true));