Made simple render system

This commit is contained in:
2026-02-22 17:27:44 +00:00
parent 8817f90ed1
commit 864c0247bb
15 changed files with 341 additions and 208 deletions

View File

@@ -1,10 +1,9 @@
#pragma once
#include "cve_window.hpp"
#include "cve_pipeline.hpp"
#include "cve_device.hpp"
#include "cve_swap_chain.hpp"
#include "cve_game_object.hpp"
#include "cve_renderer.hpp"
#include <memory>
#include <vector>
@@ -24,21 +23,10 @@ namespace cve {
void run();
private:
void loadGameObjects();
void createPipelineLayout();
void createPipeline();
void createCommandBuffers();
void freeCommandBuffers();
void drawFrame();
void recreateSwapChain();
void recordCommandBuffer(int imageIndex);
void renderGameObjects(VkCommandBuffer commandBuffer);
CveWindow cveWindow{WIDTH, HEIGHT, "Hello Vulkan!"};
CveDevice cveDevice{cveWindow};
std::unique_ptr<CveSwapChain> cveSwapChain;
std::unique_ptr<CvePipeline> cvePipeline;
VkPipelineLayout pipelineLayout;
std::vector<VkCommandBuffer> commandBuffers;
CveRenderer cveRenderer{cveWindow, cveDevice};
std::vector<CveGameObject> gameObjects;
};
}