#pragma once #include "hk_device.hpp" #include "hk_pipeline.hpp" #include "hk_swap_chain.hpp" #include "hk_window.hpp" #include "hk_model.hpp" // std #include #include namespace hk { 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 loadModels(); void createPipelineLayout(); void createPipeline(); void createCommandBuffers(); void freeCommandBuffers(); void drawFrame(); void recreateSwapChain(); void recordCommandBuffer(int imageIndex); Window window{WIDTH, HEIGHT, "Hello Vulkan!"}; Device device{window}; std::unique_ptr swapChain; std::unique_ptr pipeline; VkPipelineLayout pipelineLayout; std::vector commandBuffers; std::unique_ptr model; }; }