Add render resource handling for geometry
This commit is contained in:
@@ -20,13 +20,12 @@ namespace OpenVulkano::Vulkan
|
||||
{
|
||||
SimpleDrawable* drawable = static_cast<SimpleDrawable*>(instance);
|
||||
Geometry* mesh = drawable->GetMesh();
|
||||
VulkanGeometry* renderGeo = static_cast<VulkanGeometry*>(mesh->renderGeo);
|
||||
VulkanGeometry* renderGeo = mesh->GetRenderResource();
|
||||
if (!renderGeo) renderGeo = drawContext->renderer->GetResourceManager().PrepareGeometry(mesh);
|
||||
renderGeo->RecordBind(drawContext->commandBuffer);
|
||||
|
||||
if (drawable->GetBuffer())
|
||||
{
|
||||
|
||||
VulkanUniformBuffer* vkBuffer = drawable->GetBuffer()->GetRenderResource();
|
||||
if (!vkBuffer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user