We be kinda rendering
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user