Add GridDrawable

This commit is contained in:
2023-08-07 21:18:19 +02:00
parent f3c0cc5965
commit 6ad5d69870
3 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "Scene/Prefabs/GridDrawable.hpp"
#include "VulkanGeometry.hpp"
#include "Vulkan/VulkanDrawContext.hpp"
using namespace openVulkanoCpp::Scene;
namespace openVulkanoCpp::Vulkan
{
void EncodeGridDrawable(Drawable* instance, Vulkan::VulkanDrawContext* drawContext)
{
drawContext->commandBuffer.draw(4, 1, 0, 0);
}
}
namespace
{
void* gridDrawableVulkanEncoderReg = DrawEncoder::RegisterVulkanEncodeFunction<GridDrawable>(&openVulkanoCpp::Vulkan::EncodeGridDrawable);
}