#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "window.h" #include "surface.h" #include "instance.h" #include "physicaldevice.h" #include "logicaldevice.h" namespace Engine { const int MAX_FRAMES_IN_FLIGHT = 2; class Engine { public: Engine(); ~Engine(); void run(); void addDeviceExtension(const std::string& extensionName); void enableDebug(); private: void initVulkan(); void mainLoop(); void cleanup(); void pickPhysicalDevice(); void handleWindowEvent(const SDL_WindowEvent& e); private: bool initialized; Window* window; Instance* instance; Surface* surface; PhysicalDevice* physicalDevice; LogicalDevice* logicalDevice; std::set deviceExtensionNames; std::vector deviceExtensions; }; }