We be kinda rendering

This commit is contained in:
2026-01-05 06:20:49 +01:00
parent 1168f9e5d1
commit c83c423b42
48 changed files with 2789 additions and 382 deletions
@@ -5,13 +5,27 @@
#include <memory>
#include <destrum/Graphics/Pipeline.h>
#include <destrum/Graphics/MeshCache.h>
#include <destrum/Graphics/MaterialCache.h>
#include <destrum/Graphics/Camera.h>
#include <destrum/Graphics/Resources/Buffer.h>
#include <destrum/Graphics/MeshDrawCommand.h>
class MeshPipeline {
public:
MeshPipeline();
~MeshPipeline();
void init(GfxDevice& gfxDevice, VkFormat drawImageFormat, VkFormat depthImageFormat);
void draw();
void draw(VkCommandBuffer cmd,
VkExtent2D renderExtent,
const GfxDevice& gfxDevice,
const MeshCache& meshCache,
const MaterialCache& materialCache,
const Camera& camera,
const GPUBuffer& sceneDataBuffer,
const std::vector<MeshDrawCommand>& drawCommands,
const std::vector<std::size_t>& sortedDrawCommands);
private:
@@ -19,6 +33,14 @@ private:
std::unique_ptr<Pipeline> m_pipeline;
struct PushConstants {
glm::mat4 transform;
VkDeviceAddress sceneDataBuffer;
VkDeviceAddress vertexBuffer;
std::uint32_t materialId;
std::uint32_t padding;
};
};
#endif //MESHPIPELINE_H