mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-09 10:33:51 +00:00
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "object_placer.hpp"
|
||
|
|
#include <vulkan/vulkan.h>
|
||
|
|
#include <vk_mem_alloc.h>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
namespace wowee {
|
||
|
|
namespace rendering { class VkContext; }
|
||
|
|
|
||
|
|
namespace editor {
|
||
|
|
|
||
|
|
class EditorMarkers {
|
||
|
|
public:
|
||
|
|
EditorMarkers();
|
||
|
|
~EditorMarkers();
|
||
|
|
|
||
|
|
bool initialize(rendering::VkContext* ctx, VkRenderPass renderPass,
|
||
|
|
VkDescriptorSetLayout perFrameLayout);
|
||
|
|
void shutdown();
|
||
|
|
|
||
|
|
void update(const std::vector<PlacedObject>& objects);
|
||
|
|
void render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet);
|
||
|
|
|
||
|
|
void clear();
|
||
|
|
|
||
|
|
private:
|
||
|
|
bool createPipeline();
|
||
|
|
|
||
|
|
rendering::VkContext* vkCtx_ = nullptr;
|
||
|
|
VkRenderPass renderPass_ = VK_NULL_HANDLE;
|
||
|
|
VkDescriptorSetLayout perFrameLayout_ = VK_NULL_HANDLE;
|
||
|
|
|
||
|
|
VkPipeline pipeline_ = VK_NULL_HANDLE;
|
||
|
|
VkPipelineLayout pipelineLayout_ = VK_NULL_HANDLE;
|
||
|
|
|
||
|
|
VkBuffer vertexBuffer_ = VK_NULL_HANDLE;
|
||
|
|
VmaAllocation vertexAlloc_ = VK_NULL_HANDLE;
|
||
|
|
uint32_t vertexCount_ = 0;
|
||
|
|
|
||
|
|
struct MarkerVertex {
|
||
|
|
float pos[3];
|
||
|
|
float color[4];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace editor
|
||
|
|
} // namespace wowee
|