#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 #include namespace cve { class FirstApp { public: 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 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; std::unique_ptr cvePipeline; VkPipelineLayout pipelineLayout; std::vector commandBuffers; std::vector gameObjects; }; }