summaryrefslogtreecommitdiff
path: root/engine/xe_render_system.hpp
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-09-19 16:35:45 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2022-09-19 16:35:45 -0400
commit2f99eee7c5f0088e3c39c21a5d2efd7335953ae8 (patch)
tree210845819e39ad9df558ffa3234205e4cd14c48a /engine/xe_render_system.hpp
parentmore recatoring, doesnt compile (diff)
downloadminecraftvulkan-2f99eee7c5f0088e3c39c21a5d2efd7335953ae8.tar.gz
minecraftvulkan-2f99eee7c5f0088e3c39c21a5d2efd7335953ae8.tar.bz2
minecraftvulkan-2f99eee7c5f0088e3c39c21a5d2efd7335953ae8.zip
even more refactoring
Diffstat (limited to 'engine/xe_render_system.hpp')
-rw-r--r--engine/xe_render_system.hpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/engine/xe_render_system.hpp b/engine/xe_render_system.hpp
index 42079df..608e03a 100644
--- a/engine/xe_render_system.hpp
+++ b/engine/xe_render_system.hpp
@@ -5,12 +5,13 @@
#include "xe_pipeline.hpp"
#include "xe_frame_info.hpp"
#include "xe_game_object.hpp"
+#include "xe_descriptors.hpp"
+#include "xe_renderer.hpp"
#include <memory>
namespace xe {
-template<typename P, typename U>
class XeRenderSystem {
public:
@@ -19,23 +20,33 @@ class XeRenderSystem {
XeRenderSystem(
XeDevice &device,
XeRenderer &renderer,
- std::unique_ptr<XeDescriptorPool> &xeDescriptorPool,
- std::unique_ptr<XeDescriptorSetLayout> &xeDescriptorSetLayout,
+ XeDescriptorPool &xeDescriptorPool,
+ XeDescriptorSetLayout &xeDescriptorSetLayout,
std::string vert,
std::string frag,
- uint32_t pushCunstantDataSize,
- uint32_t uniformBufferDataSize);
+ uint32_t pushCunstantDataSize,
+ uint32_t uniformBufferDataSize
+ );
~XeRenderSystem();
XeRenderSystem(const XeRenderSystem &) = delete;
XeRenderSystem operator=(const XeRenderSystem &) = delete;
- void renderGameObjects(XeFrameInfo &frameInfo, std::vector<XeGameObject> &gameObjects, XeRenderSystem::XeData pushConstantData);
+ void setUnifroms(XeFrameInfo & frameInfo);
+
+ void renderGameObjects(
+ int frameIndex,
+ VkCommandBuffer commandBuffer,
+ std::vector<XeGameObject> &gameObjects,
+ void *pushConstantData,
+ uint32_t pushConstantSize,
+ void* uniformBufferData,
+ uint32_t uniformBufferSize);
private:
- void createUniformBuffers(std::unique_ptr<XeDescriptorPool> &xeDescriptorPool, std::unique_ptr<XeDescriptorSetLayout> &xeDescriptorSetLayout, uint32_t uniformBufferDataSize);
- void createPipelineLayout(std::unique_ptr<XeDescriptorSetLayout> &xeDescriptorSetLayout, uint32_t pushCunstantDataSize, uint32_t uniformBufferDataSize);
+ void createUniformBuffers(XeDescriptorPool &xeDescriptorPool, XeDescriptorSetLayout &xeDescriptorSetLayout, uint32_t uniformBufferDataSize);
+ void createPipelineLayout(XeDescriptorSetLayout &xeDescriptorSetLayout, uint32_t pushCunstantDataSize, uint32_t uniformBufferDataSize);
void createPipeline(VkRenderPass renderPass, std::string vert, std::string frag);
XeDevice& xeDevice;