implement billboard shader and add new example
This commit is contained in:
@@ -6,9 +6,11 @@
|
||||
|
||||
#include "Scene/SimpleDrawable.hpp"
|
||||
#include "Scene/Material.hpp"
|
||||
#include "Scene/UniformBuffer.hpp"
|
||||
#include "VulkanGeometry.hpp"
|
||||
#include "VulkanNode.hpp"
|
||||
#include "Vulkan/VulkanDrawContext.hpp"
|
||||
#include "Vulkan/Scene/VulkanUniformBuffer.hpp"
|
||||
#include "VulkanTexture.hpp"
|
||||
|
||||
using namespace OpenVulkano::Scene;
|
||||
@@ -22,6 +24,18 @@ namespace OpenVulkano::Vulkan
|
||||
VulkanGeometry* renderGeo = static_cast<VulkanGeometry*>(mesh->renderGeo);
|
||||
if (!renderGeo) renderGeo = drawContext->renderer->GetResourceManager().PrepareGeometry(mesh);
|
||||
renderGeo->RecordBind(drawContext->commandBuffer);
|
||||
|
||||
if (drawable->GetBuffer())
|
||||
{
|
||||
|
||||
VulkanUniformBuffer* vkBuffer = static_cast<VulkanUniformBuffer*>(drawable->GetBuffer()->renderBuffer);
|
||||
if (!vkBuffer)
|
||||
{
|
||||
vkBuffer = drawContext->renderer->GetResourceManager().PrepareUniformBuffer(drawable->GetBuffer());
|
||||
}
|
||||
vkBuffer->Record(drawContext);
|
||||
}
|
||||
|
||||
if (Material* material = drawable->GetMaterial())
|
||||
{
|
||||
if (Texture* texture = material->texture)
|
||||
|
||||
Reference in New Issue
Block a user