- implemented a proper texture composition cache.

This will mostly ensure that each patch used for composition is only loaded once and automatically unloaded once no longer needed.
So far only for paletted rendering, but the same logic can be used for true color as well.
This commit is contained in:
Christoph Oelckers 2018-12-10 01:17:39 +01:00
commit 2e7bcf9e41
32 changed files with 367 additions and 60 deletions

View file

@ -53,7 +53,7 @@ public:
FVoxelTexture(FVoxel *voxel);
int CopyPixels(FBitmap *bmp, int conversion) override;
TArray<uint8_t> GetPalettedPixels(int conversion) override;
TArray<uint8_t> CreatePalettedPixels(int conversion) override;
protected:
FVoxel *SourceVox;
@ -79,7 +79,7 @@ FVoxelTexture::FVoxelTexture(FVoxel *vox)
//
//===========================================================================
TArray<uint8_t> FVoxelTexture::GetPalettedPixels(int conversion)
TArray<uint8_t> FVoxelTexture::CreatePalettedPixels(int conversion)
{
// GetPixels gets called when a translated palette is used so we still need to implement it here.
TArray<uint8_t> Pixels(256, true);