Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/include/worldpass.h

47 lines
980 B
C
Raw Normal View History

2018-10-15 19:52:16 -04:00
#pragma once
#include <vulkan/vulkan.h>
2018-12-19 12:19:52 -05:00
#include "rendercollection.h"
2018-10-15 19:52:16 -04:00
class Renderer;
2018-10-16 08:49:25 -04:00
class World;
struct RenderTarget;
2018-10-25 08:57:36 -04:00
class Camera;
2018-10-15 19:52:16 -04:00
class WorldPass {
public:
WorldPass(Renderer& renderer);
2018-10-15 20:03:01 -04:00
~WorldPass();
2018-10-16 08:49:25 -04:00
2018-12-19 12:19:52 -05:00
void render(VkCommandBuffer commandBuffer, RenderCollection& collection, RenderTarget* target);
2018-10-16 08:49:25 -04:00
2018-10-17 09:28:47 -04:00
VkRenderPass getRenderPass() const {
return renderPass_;
}
2018-10-15 19:52:16 -04:00
private:
2018-10-17 09:28:47 -04:00
void createRenderPass();
2018-10-18 21:46:48 -04:00
void createDescriptorSetLayout();
2018-10-15 19:52:16 -04:00
void createPipeline();
2018-12-19 12:19:52 -05:00
void createUniformBuffers();
2018-10-18 21:46:48 -04:00
void createDescriptorSet();
2018-10-25 08:57:36 -04:00
2018-10-17 09:28:47 -04:00
VkRenderPass renderPass_ = nullptr;
2018-10-25 08:57:36 -04:00
2018-10-18 21:46:48 -04:00
VkDescriptorSetLayout setLayout_ = nullptr;
2018-10-25 08:57:36 -04:00
2018-10-15 19:52:16 -04:00
VkPipelineLayout pipelineLayout_ = nullptr;
VkPipeline pipeline_ = nullptr;
2018-12-19 12:19:52 -05:00
VkDeviceMemory sceneMemory_ = nullptr;
VkBuffer sceneBuffer_ = nullptr;
2018-10-25 08:57:36 -04:00
2018-10-18 21:46:48 -04:00
VkDeviceMemory lightMemory_ = nullptr;
VkBuffer lightBuffer_ = nullptr;
2018-10-25 08:57:36 -04:00
2018-10-18 21:46:48 -04:00
VkDescriptorSet descriptorSet_ = nullptr;
2018-10-16 08:49:25 -04:00
2018-10-15 19:52:16 -04:00
Renderer& renderer_;
};