- optimization of texture scaling checks.

The texture dimension checks can be performed up front when the texture is inserted into the texture manager.
This commit is contained in:
Christoph Oelckers 2020-04-17 00:37:05 +02:00
commit 70ec20c137
33 changed files with 167 additions and 169 deletions

View file

@ -38,6 +38,7 @@
#include "bitmap.h"
#include "imagehelpers.h"
#include "image.h"
#include "textures.h"
class FBarShader : public FImageSource
@ -128,9 +129,9 @@ private:
};
FTexture *CreateShaderTexture(bool vertical, bool reverse)
FGameTexture *CreateShaderTexture(bool vertical, bool reverse)
{
FStringf name("BarShader%c%c", vertical ? 'v' : 'h', reverse ? 'r' : 'f');
return CreateImageTexture(new FBarShader(vertical, reverse), name.GetChars());
return MakeGameTexture(CreateImageTexture(new FBarShader(vertical, reverse), name.GetChars()), ETextureType::Override);
}