diff --git a/include/gfx_device.hpp b/include/gfx_device.hpp index 949da86..14a4bd8 100644 --- a/include/gfx_device.hpp +++ b/include/gfx_device.hpp @@ -10,17 +10,21 @@ struct SDL_Window; namespace engine::gfx { - struct ENGINE_API GFXDevice { + class ENGINE_API GFXDevice { + public: GFXDevice(AppInfo appInfo, SDL_Window* window); GFXDevice(const GFXDevice&) = delete; GFXDevice& operator=(const GFXDevice&) = delete; ~GFXDevice(); + // submit command lists and draw to the screen + void draw(); + private: class Impl; - std::unique_ptr pimpl; + std::unique_ptr m_pimpl; }; diff --git a/src/gfx_device_vulkan.cpp b/src/gfx_device_vulkan.cpp index 4b6ce69..a45a7bb 100644 --- a/src/gfx_device_vulkan.cpp +++ b/src/gfx_device_vulkan.cpp @@ -810,8 +810,7 @@ namespace engine::gfx { throw std::runtime_error("The loaded Vulkan version must be at least 1.3"); } - pimpl = std::make_unique(appInfo, window); - + m_pimpl = std::make_unique(appInfo, window); } @@ -820,6 +819,11 @@ namespace engine::gfx { TRACE("Destroying GFXDevice..."); } + void GFXDevice::draw() + { + TRACE("Drawing"); + } + } #endif