Fix printf and conversion warnings

This commit is contained in:
RaveYard 2022-06-24 14:00:15 +02:00
parent 0e3340b807
commit 3e701313dc
2 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,7 @@ void FLevel::SetupLights()
{
FString hex = FString("0x") + FString(key.value);
hex.StripChars("\"");
printf("Sun color: %s\n", hex);
printf("Sun color: %s\n", hex.GetChars());
int rgb = hex.ToULong();
lightcolor = (uint32_t)rgb;
}

View file

@ -97,7 +97,7 @@ void GPURaytracer::Raytrace(LevelMesh* level)
size_t maxTasks = (size_t)rayTraceImageSize * rayTraceImageSize;
for (size_t startTask = 0; startTask < tasks.size(); startTask += maxTasks)
{
printf("\r%.1f%%\t%d/%d", double(startTask) / double(tasks.size()) * 100, startTask, tasks.size());
printf("\r%.1f%%\t%llu/%llu", double(startTask) / double(tasks.size()) * 100, startTask, tasks.size());
size_t numTasks = std::min(tasks.size() - startTask, maxTasks);
UploadTasks(tasks.data() + startTask, numTasks);
@ -145,7 +145,7 @@ void GPURaytracer::Raytrace(LevelMesh* level)
EndTracing();
DownloadTasks(tasks.data() + startTask, numTasks);
}
printf("\r%.1f%%\t%d/%d\n", 100.0, tasks.size(), tasks.size());
printf("\r%.1f%%\t%llu/%llu\n", 100.0, tasks.size(), tasks.size());
});
if (device->renderdoc)
@ -405,7 +405,7 @@ void GPURaytracer::CreateVertexAndIndexBuffers()
info.EmissiveColor = vec3(0.0f, 0.0f, 0.0f);
}
info.SamplingDistance = surface->sampleDimension;
info.SamplingDistance = float(surface->sampleDimension);
surfaces.push_back(info);
}