mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-22 12:01:09 +00:00
Fix printf and conversion warnings
This commit is contained in:
parent
0e3340b807
commit
3e701313dc
2 changed files with 4 additions and 4 deletions
|
@ -78,7 +78,7 @@ void FLevel::SetupLights()
|
||||||
{
|
{
|
||||||
FString hex = FString("0x") + FString(key.value);
|
FString hex = FString("0x") + FString(key.value);
|
||||||
hex.StripChars("\"");
|
hex.StripChars("\"");
|
||||||
printf("Sun color: %s\n", hex);
|
printf("Sun color: %s\n", hex.GetChars());
|
||||||
int rgb = hex.ToULong();
|
int rgb = hex.ToULong();
|
||||||
lightcolor = (uint32_t)rgb;
|
lightcolor = (uint32_t)rgb;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ void GPURaytracer::Raytrace(LevelMesh* level)
|
||||||
size_t maxTasks = (size_t)rayTraceImageSize * rayTraceImageSize;
|
size_t maxTasks = (size_t)rayTraceImageSize * rayTraceImageSize;
|
||||||
for (size_t startTask = 0; startTask < tasks.size(); startTask += maxTasks)
|
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);
|
size_t numTasks = std::min(tasks.size() - startTask, maxTasks);
|
||||||
UploadTasks(tasks.data() + startTask, numTasks);
|
UploadTasks(tasks.data() + startTask, numTasks);
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ void GPURaytracer::Raytrace(LevelMesh* level)
|
||||||
EndTracing();
|
EndTracing();
|
||||||
DownloadTasks(tasks.data() + startTask, numTasks);
|
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)
|
if (device->renderdoc)
|
||||||
|
@ -405,7 +405,7 @@ void GPURaytracer::CreateVertexAndIndexBuffers()
|
||||||
info.EmissiveColor = vec3(0.0f, 0.0f, 0.0f);
|
info.EmissiveColor = vec3(0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
info.SamplingDistance = surface->sampleDimension;
|
info.SamplingDistance = float(surface->sampleDimension);
|
||||||
surfaces.push_back(info);
|
surfaces.push_back(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue