- 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:
parent
796c0fe931
commit
2e7bcf9e41
32 changed files with 367 additions and 60 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue