mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-24 21:01:15 +00:00
Fix misc bugs
This commit is contained in:
parent
156ef319af
commit
9ed4723e6e
3 changed files with 6 additions and 3 deletions
|
@ -16,6 +16,8 @@ DoomLevelMesh::DoomLevelMesh(FLevel& doomMap, int samples, int lmdims)
|
||||||
StaticMesh = std::make_unique<DoomLevelSubmesh>();
|
StaticMesh = std::make_unique<DoomLevelSubmesh>();
|
||||||
|
|
||||||
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->CreateStatic(doomMap);
|
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->CreateStatic(doomMap);
|
||||||
|
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->PackLightmapAtlas(0);
|
||||||
|
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->BindLightmapSurfacesToGeometry(doomMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DoomLevelMesh::AddSurfaceLights(const LevelMeshSurface* surface, LevelMeshLight* list, int listMaxSize)
|
int DoomLevelMesh::AddSurfaceLights(const LevelMeshSurface* surface, LevelMeshLight* list, int listMaxSize)
|
||||||
|
|
|
@ -46,14 +46,15 @@ void GPURaytracer::Raytrace(DoomLevelMesh* mesh)
|
||||||
printf(".");
|
printf(".");
|
||||||
raytrace->SetLevelMesh(mesh);
|
raytrace->SetLevelMesh(mesh);
|
||||||
lightmap->SetLevelMesh(mesh);
|
lightmap->SetLevelMesh(mesh);
|
||||||
raytrace->BeginFrame();
|
|
||||||
lightmap->BeginFrame();
|
|
||||||
|
|
||||||
// Keep baking until all surfaces have been processed
|
// Keep baking until all surfaces have been processed
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
printf(".");
|
printf(".");
|
||||||
|
|
||||||
|
raytrace->BeginFrame();
|
||||||
|
lightmap->BeginFrame();
|
||||||
|
|
||||||
TArray<LevelMeshSurface*> surfaces;
|
TArray<LevelMeshSurface*> surfaces;
|
||||||
for (int i = 0, count = submesh->GetSurfaceCount(); i < count; i++)
|
for (int i = 0, count = submesh->GetSurfaceCount(); i < count; i++)
|
||||||
{
|
{
|
||||||
|
|
2
thirdparty/ZVulkan/src/vulkanbuilders.cpp
vendored
2
thirdparty/ZVulkan/src/vulkanbuilders.cpp
vendored
|
@ -1680,7 +1680,6 @@ VulkanInstanceBuilder::VulkanInstanceBuilder()
|
||||||
{
|
{
|
||||||
apiVersionsToTry = { VK_API_VERSION_1_2, VK_API_VERSION_1_1, VK_API_VERSION_1_0 };
|
apiVersionsToTry = { VK_API_VERSION_1_2, VK_API_VERSION_1_1, VK_API_VERSION_1_0 };
|
||||||
|
|
||||||
OptionalExtension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME);
|
|
||||||
OptionalExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
|
OptionalExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1701,6 +1700,7 @@ VulkanInstanceBuilder& VulkanInstanceBuilder::RequireSurfaceExtensions(bool enab
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
RequireExtension(VK_KHR_SURFACE_EXTENSION_NAME);
|
RequireExtension(VK_KHR_SURFACE_EXTENSION_NAME);
|
||||||
|
OptionalExtension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME);
|
||||||
|
|
||||||
#if defined(VK_USE_PLATFORM_WIN32_KHR)
|
#if defined(VK_USE_PLATFORM_WIN32_KHR)
|
||||||
RequireExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
RequireExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
||||||
|
|
Loading…
Reference in a new issue