First step towards refactoring

This commit is contained in:
RaveYard 2023-08-31 20:32:38 +02:00 committed by Magnus Norddahl
commit 6fc7eaf2fa
4 changed files with 34 additions and 28 deletions

View file

@ -477,7 +477,7 @@ void VulkanRenderDevice::BeginFrame()
void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TArray<uint16_t>& LMTextureData, hwrenderer::LevelMesh& mesh)
{
if(mesh.surfaces.size() > 0)
if(false && mesh.surfaces.size() > 0)
{
Printf("Running VkLightmap.\n");
@ -494,7 +494,7 @@ void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TAr
std::sort(mesh.surfaces.begin(), mesh.surfaces.end(), [](const std::unique_ptr<hwrenderer::Surface>& a, const std::unique_ptr<hwrenderer::Surface>& b) { return a->texHeight != b->texHeight ? a->texHeight > b->texHeight : a->texWidth > b->texWidth; });
RectPacker packer(LMTextureSize, LMTextureSize);
RectPacker packer(LMTextureSize, LMTextureSize, RectPacker::Spacing(0));
for (auto& surface : mesh.surfaces)
{