From 321d8f2a3ae6a0358a22214afb55f347f59afe51 Mon Sep 17 00:00:00 2001 From: Danilo Date: Tue, 2 Apr 2024 09:32:06 -0300 Subject: [PATCH] Corrige Interfaces --- framework/game/gdeviceinfo.hpp | 1 + framework/game/gdevicemanager.hpp | 1 + framework/graphics/rendertarget.hpp | 3 --- framework/platform/gdeviceinfo-dx.hpp | 2 ++ framework/platform/gdevicemanager-dx.hpp | 2 ++ framework/platform/rendertarget-dx.hpp | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/framework/game/gdeviceinfo.hpp b/framework/game/gdeviceinfo.hpp index 88a7ae0..a01baaf 100644 --- a/framework/game/gdeviceinfo.hpp +++ b/framework/game/gdeviceinfo.hpp @@ -7,6 +7,7 @@ namespace xna { class IGraphicsDeviceInformation { public: + virtual ~IGraphicsDeviceInformation(){} virtual PGraphicsAdapter Adapter() const = 0; virtual void Adapter(PGraphicsAdapter const& value) = 0; virtual xna::PresentationParameters PresentationParameters() const = 0; diff --git a/framework/game/gdevicemanager.hpp b/framework/game/gdevicemanager.hpp index 409002b..d5e671b 100644 --- a/framework/game/gdevicemanager.hpp +++ b/framework/game/gdevicemanager.hpp @@ -8,6 +8,7 @@ namespace xna { class IGraphicsDeviceManager { public: + virtual ~IGraphicsDeviceManager(){} virtual void ApplyChanges() = 0; virtual void ToggleFullScreen() = 0; virtual Int PreferredBackBufferWidth() const = 0; diff --git a/framework/graphics/rendertarget.hpp b/framework/graphics/rendertarget.hpp index 1989b0f..18075de 100644 --- a/framework/graphics/rendertarget.hpp +++ b/framework/graphics/rendertarget.hpp @@ -10,9 +10,6 @@ namespace xna { virtual ~IRenderTarget2D(){} virtual bool Apply() = 0; - - protected: - GraphicsDevice* _device{nullptr}; }; } diff --git a/framework/platform/gdeviceinfo-dx.hpp b/framework/platform/gdeviceinfo-dx.hpp index 6018898..92b0e23 100644 --- a/framework/platform/gdeviceinfo-dx.hpp +++ b/framework/platform/gdeviceinfo-dx.hpp @@ -8,6 +8,8 @@ namespace xna { class GraphicsDeviceInformation : public IGraphicsDeviceInformation { public: + virtual ~GraphicsDeviceInformation() override {} + inline virtual PGraphicsAdapter Adapter() const override { return _adapter; }; diff --git a/framework/platform/gdevicemanager-dx.hpp b/framework/platform/gdevicemanager-dx.hpp index 2ba6a7f..8744bb1 100644 --- a/framework/platform/gdevicemanager-dx.hpp +++ b/framework/platform/gdevicemanager-dx.hpp @@ -8,6 +8,8 @@ namespace xna { public: GraphicsDeviceManager(Game* game); + virtual ~GraphicsDeviceManager() override{} + virtual void ApplyChanges() override; virtual void ToggleFullScreen() override; diff --git a/framework/platform/rendertarget-dx.hpp b/framework/platform/rendertarget-dx.hpp index a07fe1f..8dbea9f 100644 --- a/framework/platform/rendertarget-dx.hpp +++ b/framework/platform/rendertarget-dx.hpp @@ -22,6 +22,7 @@ namespace xna { public: ID3D11RenderTargetView* _renderTargetView = nullptr; + GraphicsDevice* _device{ nullptr }; }; }