Redesigning pipeline
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
#include "cve_window.hpp"
|
||||
#include "cve_pipeline.hpp"
|
||||
#include "cve_device.hpp"
|
||||
#include "cve_swap_chain.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace cve {
|
||||
class FirstApp {
|
||||
@@ -10,11 +14,24 @@ namespace cve {
|
||||
static constexpr int WIDTH = 800;
|
||||
static constexpr int HEIGHT = 600;
|
||||
|
||||
FirstApp();
|
||||
~FirstApp();
|
||||
|
||||
FirstApp(const FirstApp &) = delete;
|
||||
FirstApp &operator=(const FirstApp &) = delete;
|
||||
|
||||
void run();
|
||||
private:
|
||||
void createPipelineLayout();
|
||||
void createPipeline();
|
||||
void createCommandBuffers();
|
||||
void drawFrame();
|
||||
|
||||
CveWindow cveWindow{WIDTH, HEIGHT, "Hello Vulkan!"};
|
||||
CveDevice cveDevice{cveWindow};
|
||||
CvePipeline cvePipeline{cveDevice, "shaders/simple_shader.vert.spv",
|
||||
"shaders/simple_shader.frag.spv", CvePipeline::defaultPipelineConfigInfo(WIDTH, HEIGHT)};
|
||||
CveSwapChain cveSwapChain{cveDevice, cveWindow.getExtent()};
|
||||
std::unique_ptr<CvePipeline> cvePipeline;
|
||||
VkPipelineLayout pipelineLayout;
|
||||
std::vector<VkCommandBuffer> commandBuffers;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user