#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include class Instance; class Swapchain; class Pipeline; class Buffer; class CommandPool; class Image; class ComputePipeline; class Fence; class Semaphore; class Camera; class Application { public: explicit Application(); void mainLoop(); ~Application(); protected: Swapchain* swapchain = nullptr; Pipeline* graphicsPipeline = nullptr; Buffer* uniformBuffer = nullptr; void updateUniformBuffer(); void recordGraphicsCommandBuffer(uint32_t imageIndex); Semaphore* imageAvailable = nullptr; Semaphore* renderFinished = nullptr; Semaphore* computeFinished = nullptr; Fence* renderInFlight = nullptr; Fence* computeInFlight = nullptr; void drawFrame(); virtual void recordDrawCommands() {}; virtual void recordComputeCommands(VkCommandBuffer cmdBuffer) {} void update(); void createSyncObjects(); Camera* camera = nullptr; };