summaryrefslogtreecommitdiff
path: root/engine/xe_render_system.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--engine/xe_render_system.hpp32
1 files changed, 13 insertions, 19 deletions
diff --git a/engine/xe_render_system.hpp b/engine/xe_render_system.hpp
index 608e03a..fa56fdd 100644
--- a/engine/xe_render_system.hpp
+++ b/engine/xe_render_system.hpp
@@ -3,10 +3,10 @@
#include <vulkan/vulkan.h>
#include "xe_device.hpp"
#include "xe_pipeline.hpp"
-#include "xe_frame_info.hpp"
#include "xe_game_object.hpp"
#include "xe_descriptors.hpp"
#include "xe_renderer.hpp"
+#include "xe_engine.hpp"
#include <memory>
@@ -14,42 +14,36 @@ namespace xe {
class XeRenderSystem {
public:
-
- struct XeData{};
-
+
XeRenderSystem(
- XeDevice &device,
- XeRenderer &renderer,
- XeDescriptorPool &xeDescriptorPool,
- XeDescriptorSetLayout &xeDescriptorSetLayout,
+ XeEngine &xeEngine,
std::string vert,
std::string frag,
uint32_t pushCunstantDataSize,
uint32_t uniformBufferDataSize
- );
+ );
~XeRenderSystem();
XeRenderSystem(const XeRenderSystem &) = delete;
XeRenderSystem operator=(const XeRenderSystem &) = delete;
- void setUnifroms(XeFrameInfo & frameInfo);
-
- void renderGameObjects(
- int frameIndex,
- VkCommandBuffer commandBuffer,
- std::vector<XeGameObject> &gameObjects,
- void *pushConstantData,
- uint32_t pushConstantSize,
- void* uniformBufferData,
- uint32_t uniformBufferSize);
+ void loadPushConstant(void *pushConstantData, uint32_t pushConstantSize);
+ void loadUniformObject(void *uniformBufferData, uint32_t uniformBufferSize);
+ void render(XeGameObject &gameObject);
+ void stop();
private:
+
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);
+ bool boundPipeline{false};
+ bool boundDescriptor{false};
+
XeDevice& xeDevice;
+ XeRenderer& xeRenderer;
std::unique_ptr<XePipeline> xePipeline;
std::vector<std::unique_ptr<XeBuffer>> uboBuffers;