- 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
|
|
@ -68,7 +68,7 @@ class FIMGZTexture : public FImageSource
|
|||
|
||||
public:
|
||||
FIMGZTexture (int lumpnum, uint16_t w, uint16_t h, int16_t l, int16_t t, bool isalpha);
|
||||
TArray<uint8_t> GetPalettedPixels(int conversion) override;
|
||||
TArray<uint8_t> CreatePalettedPixels(int conversion) override;
|
||||
int CopyPixels(FBitmap *bmp, int conversion) override;
|
||||
};
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ FIMGZTexture::FIMGZTexture (int lumpnum, uint16_t w, uint16_t h, int16_t l, int1
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
TArray<uint8_t> FIMGZTexture::GetPalettedPixels(int conversion)
|
||||
TArray<uint8_t> FIMGZTexture::CreatePalettedPixels(int conversion)
|
||||
{
|
||||
FMemLump lump = Wads.ReadLump (SourceLump);
|
||||
const ImageHeader *imgz = (const ImageHeader *)lump.GetMem();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue