From 50ca206428ec709e2361d5ec0b6e35235a33d111 Mon Sep 17 00:00:00 2001 From: bailwillharr Date: Sun, 2 Oct 2022 13:56:13 +0100 Subject: [PATCH] do stuff --- include/gfx_device.hpp | 8 ++++++-- src/gfx_device_vulkan.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) 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