mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-10 14:51:40 +00:00
Fix error when baking a map with no lights in it
This commit is contained in:
parent
9b6cd720dd
commit
f44e73d8d0
1 changed files with 3 additions and 0 deletions
|
@ -388,6 +388,9 @@ void GPURaytracer::CreateVertexAndIndexBuffers()
|
||||||
lights.push_back(info);
|
lights.push_back(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lights.empty()) // vulkan doesn't support zero byte buffers
|
||||||
|
lights.push_back(LightInfo());
|
||||||
|
|
||||||
size_t vertexbuffersize = (size_t)mesh->MeshVertices.Size() * sizeof(Vec3);
|
size_t vertexbuffersize = (size_t)mesh->MeshVertices.Size() * sizeof(Vec3);
|
||||||
size_t indexbuffersize = (size_t)mesh->MeshElements.Size() * sizeof(uint32_t);
|
size_t indexbuffersize = (size_t)mesh->MeshElements.Size() * sizeof(uint32_t);
|
||||||
size_t surfaceindexbuffersize = (size_t)mesh->MeshSurfaces.Size() * sizeof(uint32_t);
|
size_t surfaceindexbuffersize = (size_t)mesh->MeshSurfaces.Size() * sizeof(uint32_t);
|
||||||
|
|
Loading…
Reference in a new issue