mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 22:42:07 +00:00
Only recreate lightmap texture if its size changes
This commit is contained in:
parent
bfc5684e0c
commit
efea99b87c
2 changed files with 9 additions and 1 deletions
|
@ -189,8 +189,14 @@ void VkTextureManager::CreateLightmap()
|
|||
SetLightmap(1, 1, data);
|
||||
}
|
||||
|
||||
void VkTextureManager::CreateLightmap(int LMTextureSize, int LMTextureCount)
|
||||
void VkTextureManager::CreateLightmap(int newLMTextureSize, int newLMTextureCount)
|
||||
{
|
||||
if (LMTextureSize == newLMTextureSize && LMTextureCount == newLMTextureCount)
|
||||
return;
|
||||
|
||||
LMTextureSize = newLMTextureSize;
|
||||
LMTextureCount = newLMTextureCount;
|
||||
|
||||
int w = LMTextureSize;
|
||||
int h = LMTextureSize;
|
||||
int count = LMTextureCount;
|
||||
|
|
|
@ -40,6 +40,8 @@ public:
|
|||
|
||||
VkTextureImage Shadowmap;
|
||||
VkTextureImage Lightmap;
|
||||
int LMTextureSize = 0;
|
||||
int LMTextureCount = 0;
|
||||
|
||||
private:
|
||||
void CreateNullTexture();
|
||||
|
|
Loading…
Reference in a new issue